- Code: Select all
alias -1 inifile { return file.ini }
alias -1 developmentchannel { return #teh-evilcode }
alias -1 totalstrike { return 3 }
alias -1 excludechannels { return #fraguk }
alias -1 interval { return 600 }
on *:CONNECT: checktimer
alias checktimer {
.timer.checkflag 1 $interval checktimer
.remini $inifile flags
.msg Q whoami
}
alias checkflags {
var %x = $comchan($me,0)
while (%x) {
var %c = $comchan($me,%x)
if (!$readini($inifile,react,%c)) { .writeini -n $inifile react %c 0 }
if (!$istok($excludechannels,%c,32)) {
if (!$readini($inifile,flags,%c)) {
var %r = $readini($inifile,react,%c)
var %s = $calc(%r + 1)
.writeini -n $inifile react %c %s
.msg $developmentchannel Channel %c Strike %s out of $totalstrike
.msg %c Strike %s out of $totalstrike
}
if ($readini($inifile,react,%c) == $totalstrike) {
.msg $developmentchannel Channel: %c Strike out $totalstrik
.msg %c Channel %c Strike %s Strike out $totalstrike
.msg %c Channel %c parting no flags on Q
.remini $inifile react
if ($me ison %c) {
.part %c
}
}
}
dec %x
}
}
on *:NOTICE:*:?: {
if ($nick == Q) {
if ($left($1,1) == $chr(35)) {
.writeini -n $inifile flags $1 $2
}
if (*End of list* iswm $1-) {
checkflags
}
}
}
error from the bots status window--
* /timer: timer .checkflag not active
-
* /remini: invalid parameters (line 11, checkflags.mrc)
-