One last little thing ( i hope ).. This is for ppl mainly on buzzen that do not want to save ghost nicks.
What i mean by ghost nicks are those nicks that when their nick is already in the room it adds a number to the end like err0r45564
This will ignore the nick if it's in the list and just has a number appended to the end.
Also added the option to ignore guest nicks..
All in channel menu options under settings.
Please report any bugs or anything you would like to see changed or added.
menu channel {
History Per Chan
.$iif($istok(%History.Log,$chan,44),$style(1)) Log $chan : $iif($istok(%History.Log,$chan,44),set %History.Log $remtok(%History.Log,$chan,1,44),set %History.Log $addtok(%History.Log,$chan,44))
.$iif($istok(%History.Msg,$chan,44),$style(1)) Msg Room : $iif($istok(%History.Msg,$chan,44),set %History.Msg $remtok(%History.Msg,$chan,1,44),set %History.Msg $addtok(%History.Msg,$chan,44))
.$iif($istok(%History.Echo,$chan,44),$style(1)) Echo Room : $iif($istok(%History.Echo,$chan,44),set %History.Echo $remtok(%History.Echo,$chan,1,44),set %History.Echo $addtok(%History.Echo,$chan,44))
History Global Settings
.$iif(%History.NoGuest,$style(1)) No Guest Log : $iif(%History.NoGuest,unset %History.NoGuest,set %History.NoGuest on)
.$iif(%History.NoGhost,$style(1)) No Ghost Log : $iif(%History.NoGhost,unset %History.NoGhost,set %History.NoGhost on)
.-
.Clear Log : hfree history | $iif($exists(historyhash.txt),/remove -d historyhash.txt) | hmake history 500
.View Log : historylog
-
}
on *:start: { hmake history 100 | if ($exists(historyhash.txt)) { hload history historyhash.txt } }
on *:exit: { hsave -o history historyhash.txt | hfree history }
on !*:JOIN:#:{
if ((!$istok(%History.Log,$chan,44)) || (%History.Join)) { halt }
if (%History.NoGuest) && ($left($nick,1) == >) { halt }
set -eu2 %History.Join on
if ($hget(history,$address($nick,1))) {
if (%History.NoGhost) {
var %hs 1
while ($gettok($hget(history,$address($nick,1)),%hs,44)) { if ($regsubex($nick, /[0-9]+$/gi,$null) == $v1) { set %match yes } | inc %hs }
}
if (!%match) {
if (!$istok($hget(history,$address($nick,1)),$nick,44)) {
if ($istok(%History.Msg,$chan,44)) { msg $chan $nick has made a nick change. Previous $iif($gettok($hget(history,$address($nick,1)),2,44),nicks have been,nick was) $replace($sorttok($hget(history,$address($nick,1)),44,c),$chr(44),$chr(44) $chr(32)) }
if ($istok(%History.Echo,$chan,44)) { echo $chan 7 $nick has made a nick change. Previous $iif($gettok($hget(history,$address($nick,1)),2,44),nicks have been,nick was) $replace($sorttok($hget(history,$address($nick,1)),44,c),$chr(44),$chr(44) $chr(32)) }
if ($numtok($hget(history,$address($nick,1)),44) >= 5) { hadd -m history $address($nick,1) $+($deltok($hget(history,$address($nick,1)),1,44),$chr(44),$nick) }
else { hadd -m history $address($nick,1) $+($hget(history,$address($nick,1)),$chr(44),$nick) }
}
}
}
else { if ($istok(%History.Msg,$chan,44)) { msg $chan Haven't seen you before $nick ( logged ) } | hadd -m history $address($nick,1) $nick }
hsave -o history historyhash.txt | unset %match
}
menu @historylog {
Search: /sline -s @historylog $fline(@historylog,* $+ $?="Search for" $+ *,1,1)
Remove Selected: { /hdel -s history $gettok($sline(@historylog,1),4,32) | historylog }
Clear Log: { hfree history | $iif($exists(historyhash.txt),/remove -d historyhash.txt) | hmake history 500 | historylog }
}
alias historylog {
if (!$window(@historylog)) { /window -blk -t2,21 +benstx @historylog verdana 11 }
clear @historylog | aline @historylog $chr(9) Address $chr(9) Logged Nicks | aline @historylog $chr(160)
%hh = 1 | %hhn = $hget(history, 0).item
while (%hh <= %hhn) { aline -p @historylog $+(14,%hh,.) $chr(9) 1 $hget(history,%hh).item $chr(9) 1 $hget(history,%hh).data | inc %hh }
}
Note for some reason IPB is removing when i'm editing.. you are prolly better off getting it from the attached txt file instead.
Note: updated log menu to search, remove, and clear log
nicklogger.txt
Edited Aug 24, 2009 9:45 AM by err0r