InfoBloot — File Browser
InfoBlootv1.04 / InfoBlootv1.04 / InfoBloot.mrc
InfoBloot.mrc — 212.63 KB — Download this file
;InfoBloot
;Author - IceShaman
;Release Date - 6/9/04
;Version 1.04
;
; ___________________________________________________________
;| |
;|This script makes an infobot type mIRC bot. it is not as |
;|good as the original but maybe you'll like it. The script |
;|is 100% my code unless otherwise stated so all abuse to me.|
;|Feel free to edit it how you like and if you want email me |
;|at iceshaman@icenetwork.co.uk about it, also please leave |
;|my name somewhere in the script ^_^ |
;|___________________________________________________________|
;| |
;|Thanks: |
;| |
;|InfoBot team - Concocting the whole idea of factoids ^_^ |
;|BlootBot team - Making useless addons that do nothing :P |
;|Mircscripts.org team/users - Being a great mIRC resource |
;|___________________________________________________________|
;Define a few /vital/ variables if they don't exist
;and also sets up the default config if InfoBloot isn't detected as being previously loaded
on *:start: {
if (%ifbdir == $null) { set %ifbdir infobloot }
if ($exists(%ifbdir) == $false) { .mkdir %ifbdir }
if ($exists(%ifbdir $+ \addons) == $false) { .mkdir %ifbdir $+ \addons }
if ($readini(infobloot\ifbconfig.ini,settings,setnumber) == $null) { writeini -n infobloot\ifbconfig.ini settings setnumber 0 }
if ($readini(infobloot\ifbconfig.ini,settings,status) == $null) { writeini -n infobloot\ifbconfig.ini settings status Enabled }
if (%ifbconfigfile == $null) { set %ifbconfigfile ifbconfig.ini }
if (%ifbinfofile == $null) { set %ifbinfofile ifbfactoids.ini }
if (%ifbhelpfile == $null) { set %ifbhelpfile ifbhelp.ini }
if (%ifbhacklogfile == $null) { set %ifbhacklogfile ifbhacklog.txt }
if (%ifbbackupfile == $null) { set %ifbbackupfile settings-backup.ini }
if (%ifbbackup2file == $null) { set %ifbbackup2file factoids-backup.ini }
if ($readini(infobloot\ifbconfig.ini,settings,version) == $null) { set %ifbversion 1.04 | writeini -n infobloot\ifbconfig.ini settings version 1.04 }
else { set %ifbversion 1.04 <RC2> | writeini -n %ifbdir $+ \ $+ %ifbconfigfile settings version 1.04 }
if ($readini(infobloot\ifbconfig.ini,settings,factoidsfile) == $null) { writeini -n infobloot\ifbconfig.ini settings factoidsfile ifbfactoids.ini }
if ($readini(infobloot\ifbconfig.ini,karma,word1) == $null) { writeini -n infobloot\ifbconfig.ini karma word1 Rubbish | set %ifbkarmaword1 Rubbish }
if ($readini(infobloot\ifbconfig.ini,karma,word2) == $null) { writeini -n infobloot\ifbconfig.ini karma word2 Bad | set %ifbkarmaword2 Bad }
if ($readini(infobloot\ifbconfig.ini,karma,word3) == $null) { writeini -n infobloot\ifbconfig.ini karma word3 Ok | set %ifbkarmaword3 Ok }
if ($readini(infobloot\ifbconfig.ini,karma,word4) == $null) { writeini -n infobloot\ifbconfig.ini karma word4 Good | set %ifbkarmaword4 Good }
if ($readini(infobloot\ifbconfig.ini,karma,word5) == $null) { writeini -n infobloot\ifbconfig.ini karma word5 Excellent | set %ifbkarmaword5 Excellent }
if ($readini(infobloot\ifbconfig.ini,karma,number) == $null) { writeini -n infobloot\ifbconfig.ini karma number 1 | set %ifbkarmanum 1 }
if ($readini(infobloot\ifbconfig.ini,settings,author) == $null) { set %ifbauthor IceShaman | writeini -n infobloot\ifbconfig.ini settings author IceShaman }
if (%ifbautobackup != $null) { .timerifbautobackup 0 $calc(3600 * %ifbautobackuptime) ifbautobackup }
if (%ifbinstalled == $null) {
set %ifbsetfactoid enabled
set %ifbmultifactoid enabled
set %ifblocked enabled
set %ifbforget enabled
set %ifbstats enabled
set %ifbhacklog enabled
set %ifbfactinfo enabled
set %ifbfactnum enabled
set %ifbstats enabled
set %ifbnickometer enabled
set %ifbkarma enabled
set %ifbstatus enabled
set %ifbendecrypt enabled
set %ifbcalculate enabled
set %ifbdatetime enabled
set %ifbdnshost enabled
set %ifbtell enabled
set %ifbhelp enabled
set %ifbfloodprotect enabled
set %ifbfloodtime 5
set %ifbfloodignoretime 30
set %ifbautoclose enabled
set %ifbautoclosetime 5
set %ifbinstalled $date
echo -a 4InfoBloot Has Been Installed/Configuration Edited.
echo -a 4IAttempting To Open The Tutorial File (InfoBloot\tutorial.txt)
run infobloot\tutorial.txt
}
return
}
on *:unload: {
if (%ifbautobackup != $null) { .timertimerifbautobackup off }
if (%ifbuninstall != $null) { unset %ifb* }
}
alias -l ifbuninstall {
if (%ifbautobackup != $null) { unset %ifbautobackup | .timertimerifbautobackup off }
unset %ifb*
.unload -rs " $+ $script $+ "
}
;This answers to a hello/hi message*, works only if custom replys are enabled, see tutorial.
;(can also disabled using the dialog)
;*This can also be triggered by botname, hello or botname, hi
on *:text:hello:#: { ifbhi $1- }
on *:text:hi:#: { ifbhi $1- }
;This is the channel/message flood protection (excludes notices ctcp's e.t.c)
alias ifbflood {
inc -u5 %ifbflood
if ((%ifbfloodprotect == enabled) && (%ifbfloodtime isnum) && (%ifbfloodignoretime isnum)) {
if (%ifbflood > %ifbfloodtime) { return $true }
}
return $false
}
;This is an emergency piece of code which allows you to clear the ignore list
;designed for use when some stupid master/admin ignores *@*
ctcp *:ignoreclear:*: {
if ($ifbisadmin == $true) || ($ifbismaster(ignore) == $true) {
ignore -r | notice $nick Emergency Ignore List Clear Activated | return
}
}
;This piece of code is the InfoBot protocol which basically asks other bots if it doesn't have
;a definition of a factoid and answers other bots if they ask for a definition. See Tutorial
;*it also provides support for linked databases of InfoBloot storing answered factoids*
on *:text:*:?: {
if ((%ifbautoclose == enabled) && (%ifbautoclosetime isnum)) { .timer 1 %ifbautoclosetime .close -m }
if (%ifblobotomy == enabled) { return }
if ($ifbflood == $true) { set -u $+ %ifbfloodignoretime % $+ ifblobotomy enabled }
if ($1 == help) { ifbhelpnick $nick $1- }
if (($1 == join) && (($ifbisadmin == $true) || ($ifbismaster(chancommands) == $true))) { join $2 $3 | return }
if (($1 == part) && (($ifbisadmin == $true) || ($ifbismaster(chancommands) == $true))) { part $2 $3 | return }
if (($1 == announce) && (($ifbisadmin == $true) || ($ifbismaster(chancommands) == $true))) { announcechan <botmessage> <command> announce $$2- | return }
if ($1 == authenticate) {
if ($readini(%ifbdir $+ \ $+ %ifbconfigfile,masters-code,$nick) == $$2) { writeini %ifbdir $+ \ $+ %ifbconfigfile masters-host $nick $mask($right($gettok($rawmsg,1,32),-1),4) | msg $nick You Have Been Successfully Authenticated | return }
elseif ((%ifbmasteradmin == $nick) && ($$2 == %ifbmasteradmin-code)) { set %ifbmasteradmin-host $mask($right($gettok($rawmsg,1,32),-1),4) | msg $nick You Have Been Successfully Authenticated | return }
}
elseif (%ifbbotask != enabled) { return }
if ($$1 == :INFOBOT:QUERY) {
var %ifbbotasknumber = 1, %ifbbottotalnumber = $calc($ini(%ifbdir $+ \ $+ %ifbconfigfile,botask,0) + 1)
while (%ifbbotasknumber < %ifbbottotalnumber) {
if ($readini(%ifbdir $+ \ $+ %ifbconfigfile,botask,$ini(%ifbdir $+ \ $+ %ifbconfigfile,botask,%ifbbotasknumber)) != $null) {
var %ifbbotaskallowed = true
inc %ifbbotasknumber 1
}
}
if (%ifbbotaskallowed != true) { return }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$$3,name) != $null) { .msg $nick :INFOBOT:REPLY $$2 $$3- = $+ $readini(%ifbdir $+ \ $+ %ifbinfofile,$$3,type) $+ => $iif($readini(%ifbdir $+ \ $+ %ifbinfofile,$$3,reply) == true,<reply>,$iif($readini(%ifbdir $+ \ $+ %ifbinfofile,$$3,action),<action>,$iif($readini(%ifbdir $+ \ $+ %ifbinfofile,$$3,alias) == true,<alias>,$null))) $+ $readini(%ifbdir $+ \ $+ %ifbinfofile,n,$$3,factoid) }
else {
if (%ifbbotreplyadd == enabled) { .msg $nick :INFOBOT:DUNNO $$2 $$3- }
}
if ((%ifbautoclose == enabled) && (%ifbautoclosetime isnum)) { .timer 1 %ifbautoclosetime .close -m }
}
if ($$1 == :INFOBOT:REPLY) {
if (%ifbbotaskanswer == true) || ($gettok(%ifbbotreplyalias,1,32) == $nick) {
if ((%ifbautoclose == enabled) && (%ifbautoclosetime isnum)) { .timer 1 %ifbautoclosetime .close -m }
}
if ($nick isin %ifbbotaskasked) || ($gettok(%ifbbotreplyalias,1,32) == $nick) {
if ($gettok(%ifbbotreplyalias,1,32) == $nick) {
unset %ifbbotreplyalias
.timerifbbotaskalias off
var %ifbbotaskfactoidname = $gettok(%ifbbotreplyalias,2,32)
if ($$5 == <alias>) || ($left($$5,7) == <alias>) || ($chr(124) $+ <alias> isin $remove($5-,$chr(32))) { msg %ifbreplychan No Factoid Match | return }
}
else { var %ifbbotaskfactoidname = $strip($$3) }
.timerifbbotaskreply off
set %ifbbotaskanswer true
set -u15 %ifbbotaskdunnoreply %ifbbotaskfactoidname $$4 $$5
var %ifbreplyword = $$4
if ($ifbhackattempt($$5-) == $true) { msg %ifbreplychan Match Contains Forbidden Variables/Identifiers $chr(2) $+ $chr(91) $+ $chr(2) $+ Source: $nick $+ $chr(2) $+ $chr(93) $+ $chr(2) }
elseif ($chr(124) isin $$5-) {
if ((($3 != $null) || ($chr(95) isin $2-)) && (%ifbmultifactoid != enabled)) else { msg %ifbreplychan Error: Incompatible Reply $chr(2) $+ $chr(91) $+ $chr(2) $+ Source: $nick $+ $chr(2) $+ $chr(93) $+ $chr(2) }
var %ifbreadfactoidline = $$5-
var %ifbfactoidlinepicked = $rand(1,$calc($count(%ifbreadfactoidline,$chr(124)) + 1))
if (%ifbfactoidlinepicked <= $count(%ifbreadfactoidline,$chr(124))) { var %ifbsayfactoidline = $left($left(%ifbreadfactoidline,$pos(%ifbreadfactoidline,$chr(124),%ifbfactoidlinepicked)),-1) }
else { var %ifbsayfactoidline = %ifbreadfactoidline }
if (%ifbbotreplyadd == enabled) {
if ($$5 == <reply>) { var %ifbfactoidformat = reply }
elseif ($left($$5,7) == <reply>) { var %ifbfactoidformat = reply | var %ifbfactoidchop 7 }
elseif ($$5 == <action>) { var %ifbfactoidformat = action }
elseif ($left($$5,8) == <action>) { var %ifbfactoidformat = reply | var %ifbfactoidchop 8 }
elseif ($$5 == <alias>) { var %ifbfactoidformat = alias }
elseif ($left($$5,7) == <alias>) { var %ifbfactoidformat = alias | var %ifbfactoidchop 7 }
else { var %ifbfactoidformat = normal }
}
if ($chr(124) isin %ifbsayfactoidline) { var %ifbsayfactoidline = $eval($remove($right($right(%ifbsayfactoidline,-3),- $+ $pos($right(%ifbsayfactoidline,-3),$chr(124),$pos($right(%ifbsayfactoidline,-3),$chr(124),0))),$chr(124)),2) }
if ($gettok(%ifbsayfactoidline,1,32) == <reply>) { msg %ifbreplychan $eval($replace($gettok(%ifbsayfactoidline,2-,32),$chr(36) $+ who,$remove($$2,$chr(60),$chr(62)),$chr(36) $+ nick,$remove($$2,$chr(60),$chr(62)),$chr(36) $+ chan,%ifbreplychan),2) $chr(2) $+ $chr(91) $+ $chr(2) $+ Source: $nick $+ $chr(2) $+ $chr(93) $+ $chr(2) }
elseif ($left(%ifbsayfactoidline,7) == <reply>) { msg %ifbreplychan $eval($replace($right(%ifbsayfactoidline,-7),$chr(36) $+ who,$remove($$2,$chr(60),$chr(62)),$chr(36) $+ nick,$remove($$2,$chr(60),$chr(62)),$chr(36) $+ chan,%ifbreplychan),2) $chr(2) $+ $chr(91) $+ $chr(2) $+ Source: $nick $+ $chr(2) $+ $chr(93) $+ $chr(2) }
elseif ($gettok(%ifbsayfactoidline,1,32) == <action>) { describe %ifbreplychan $eval($replace($gettok(%ifbsayfactoidline,2-,32),$chr(36) $+ who,$remove($$2,$chr(60),$chr(62)),$chr(36) $+ nick,$remove($$2,$chr(60),$chr(62)),$chr(36) $+ chan,%ifbreplychan),2) $chr(2) $+ $chr(91) $+ $chr(2) $+ Source: $nick $+ $chr(2) $+ $chr(93) $+ $chr(2) }
elseif ($left($remove(%ifbsayfactoidline,$chr(32)),8) == <action>) { describe %ifbreplychan $eval($replace($right(%ifbsayfactoidline,-8),$chr(36) $+ who,$remove($$2,$chr(60),$chr(62)),$chr(36) $+ nick,$remove($$2,$chr(60),$chr(62)),$chr(36) $+ chan,%ifbreplychan),2) $chr(2) $+ $chr(91) $+ $chr(2) $+ Source: $nick $+ $chr(2) $+ $chr(93) $+ $chr(2) }
elseif ($gettok(%ifbsayfactoidline,1,32) == <alias>) { .timerifbbotaskalias 1 15 ifbbotaskalias %ifbreplychan | set %ifbbotreplyalias $remove($$2,$chr(60),$chr(62)) $$3 | .msg $nick :INFOBOT:QUERY $$2 $gettok(%ifbsayfactoidline,2-,32) }
elseif ($left($remove(%ifbsayfactoidline,$chr(32)),7) == <alias>) { .timerifbbotaskalias 1 15 ifbbotaskalias %ifbreplychan | set %ifbbotreplyalias $remove($$2,$chr(60),$chr(62)) $$3 | .msg $nick :INFOBOT:QUERY $$2 $right(%ifbsayfactoidline,-7) }
elseif ($5 != $null) { msg %ifbreplychan $iif(%ifbcustombotreply == enabled,$readini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$rand(1,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,0)))),Factoid:) %ifbbotaskfactoidname $right($left(%ifbreplyword,$calc($len(%ifbreplyword) - 2)),$calc($len(%ifbreplyword) - 3)) $eval($replace(%ifbsayfactoidline,$chr(36) $+ who,$remove($$2,$chr(60),$chr(62)),$chr(36) $+ nick,$remove($$2,$chr(60),$chr(62)),$chr(36) $+ chan,%ifbreplychan),2) $chr(2) $+ $chr(91) $+ $chr(2) $+ Source: $nick $+ $chr(2) $+ $chr(93) $+ $chr(2) }
else { msg %ifbreplychan Error: Incompatible Reply $chr(2) $+ $chr(91) $+ $chr(2) $+ Source: $nick $+ $chr(2) $+ $chr(93) $+ $chr(2) }
}
elseif (((<reply> isin $$5) && ($len($$5) == 7) && ($6 == $null)) || ((<action> isin $$5) && ($len($$5) == 8) && ($6 == $null)) || ((<alias> isin $$5) && ($len($$5) == 7) && ($6 == $null))) { { msg %ifbreplychan Error: Null Reply $chr(2) $+ $chr(91) $+ $chr(2) $+ Source: $nick $+ $chr(2) $+ $chr(93) $+ $chr(2) } }
elseif ($$5 == <reply>) { msg %ifbreplychan $eval($replace($$5-,$chr(36) $+ who,$remove($$2,$chr(60),$chr(62)),$chr(36) $+ nick,$remove($$2,$chr(60),$chr(62)),$chr(36) $+ chan,%ifbreplychan),2) $chr(2) $+ $chr(91) $+ $chr(2) $+ Source: $nick $+ $chr(2) $+ $chr(93) $+ $chr(2) | var %ifbfactoidformat = reply }
elseif ($left($$5,7) == <reply>) { msg %ifbreplychan $eval($replace($right($$5-,-7),$chr(36) $+ who,$remove($$2,$chr(60),$chr(62)),$chr(36) $+ nick,$remove($$2,$chr(60),$chr(62)),$chr(36) $+ chan,%ifbreplychan),2) $chr(2) $+ $chr(91) $+ $chr(2) $+ Source: $nick $+ $chr(2) $+ $chr(93) $+ $chr(2) | var %ifbfactoidformat = reply | var %ifbfactoidchop 7 }
elseif ($$5 == <action>) { describe %ifbreplychan $eval($replace($$5-,$chr(36) $+ who,$remove($$2,$chr(60),$chr(62)),$chr(36) $+ nick,$remove($$2,$chr(60),$chr(62)),$chr(36) $+ chan,%ifbreplychan),2) $chr(2) $+ $chr(91) $+ $chr(2) $+ Source: $nick $+ $chr(2) $+ $chr(93) $+ $chr(2) | var %ifbfactoidformat = action }
elseif ($left($$5,8) == <action>) { describe %ifbreplychan $eval($replace($right($$5-,-8),$chr(36) $+ who,$remove($$2,$chr(60),$chr(62)),$chr(36) $+ nick,$remove($$2,$chr(60),$chr(62)),$chr(36) $+ chan,%ifbreplychan),2) $chr(2) $+ $chr(91) $+ $chr(2) $+ Source: $nick $+ $chr(2) $+ $chr(93) $+ $chr(2) | var %ifbfactoidformat = action | var %ifbfactoidchop 8 }
elseif ($$5 == <alias>) { .timerifbbotaskalias 1 15 ifbbotaskalias $chan | set %ifbbotreplyalias $nick $$3 | .msg $nick :INFOBOT:QUERY $$2 $$6- | return }
elseif ($left($$5,7) == <alias>) { .timerifbbotaskalias 1 15 ifbbotaskalias $chan | set %ifbbotreplyalias $nick $$3 | .msg $nick :INFOBOT:QUERY $$2 $right($$5-,-7) | return }
elseif ($5 != $null) { msg %ifbreplychan $iif(%ifbcustombotreply == enabled,$readini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$rand(1,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,0)))),Factoid:) %ifbbotaskfactoidname $right($left(%ifbreplyword,$calc($len(%ifbreplyword) - 2)),$calc($len(%ifbreplyword) - 3)) $$5- $chr(2) $+ $chr(91) $+ $chr(2) $+ Source: $nick $+ $chr(2) $+ $chr(93) $+ $chr(2) | var %ifbfactoidformat = normal }
else { msg %ifbreplychan Error: Incompatible Reply $chr(2) $+ $chr(91) $+ $chr(2) $+ Source: $nick $+ $chr(2) $+ $chr(93) $+ $chr(2) }
unset %ifbbotaskanswer | unset %ifbbotasknick | unset %ifbbotfactoidprocessing
if (%ifbbotreplyalias == $null) { unset %ifbreplychan }
if ((%ifbbotreplyadd == enabled) && (($ini(%ifbdir $+ \ $+ %ifbinfofile,%ifbbotaskfactoidname) == 0) || ($ini(%ifbdir $+ \ $+ %ifbinfofile,%ifbbotaskfactoidname) == $null)) && (%ifbfactoidformat != $null)) {
if (%ifbfactoidchop isnum) { var %ifbfactoidwrite = $right($$5-,- $+ %ifbfactoidchop) }
else { var %ifbfactoidwrite = $iif(%ifbfactoidformat != normal,$$6-,$$5-) }
if (%ifbfactoidwrite == $null) { remini -n %ifbdir $+ \ $+ %ifbinfofile $$3 | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbbotaskfactoidname null true | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbbotaskfactoidname author $nick | return }
remini -n %ifbdir $+ \ $+ %ifbinfofile %ifbbotaskfactoidname | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbbotaskfactoidname factoid %ifbfactoidwrite | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbbotaskfactoidname name %ifbbotaskfactoidname | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbbotaskfactoidname type $right($left(%ifbreplyword,$calc($len(%ifbreplyword) - 2)),$calc($len(%ifbreplyword) - 3)) | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbbotaskfactoidname author $nick | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbbotaskfactoidname locked false
writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbbotaskfactoidname date $date | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbbotaskfactoidname time $time | inc %ifbsetnumber 1 | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbbotaskfactoidname karma 5 | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbbotaskfactoidname karmalocked false | $iif(%ifbfactoidformat != normal, writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbbotaskfactoidname %ifbfactoidformat true) | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbbotaskfactoidname requested 0
if ($readini(%ifbdir $+ \ $+ ifbdunno.lst,dunno,%ifbbotaskfactoidname) != $null) {
var %ifbbotaskdunnoanswernum = $numtok($readini(%ifbdir $+ \ $+ ifbdunno.lst,dunno,%ifbbotaskfactoidname),32)
var %ifbbotaskdunnoanswerdone = 0
while (%ifbbotaskdunnoanswerdone < %ifbbotaskdunnoanswernum) {
inc %ifbbotaskdunnoanswerdone 1
.msg $gettok($readini(%ifbdir $+ \ $+ ifbdunno.lst,dunno,%ifbbotaskfactoidname),%ifbbotaskdunnoanswerdone,32) :INFOBOT:REPLY < $+ $me $+ > %ifbbotaskfactoidname = $+ $readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbbotaskfactoidname,type) $+ => $iif(%ifbfactoidformat != normal,< $+ %ifbfactoidformat $+ >,$chr(32)) $+ $readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbbotaskfactoidname,factoid)
}
remini %ifbdir $+ \ $+ ifbdunno.lst dunno %ifbbotaskfactoidname
}
}
}
else { return }
}
if ((:INFOBOT:DUNNO == $$1) && ($nick isin %ifbbotaskasked)) {
if (%ifbbotreplyadd == enabled) {
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$$3,name) != $null) { .msg $nick :INFOBOT:REPLY < $+ $me $+ > $$3 = $+ $readini(%ifbdir $+ \ $+ %ifbinfofile,$$3,type) $+ => $iif($readini(%ifbdir $+ \ $+ %ifbinfofile,$$3,reply) == true,<reply>,$iif($readini(%ifbdir $+ \ $+ %ifbinfofile,$$3,action) == true,<action>,$iif($readini(%ifbdir $+ \ $+ %ifbinfofile,$$3,alias) == true,<alias>,$chr(32)))) $+ $readini(%ifbdir $+ \ $+ %ifbinfofile,$$3,factoid) | unset %ifbbotaskdunnoreply }
elseif ($nick !isin $readini(%ifbdir $+ \ $+ ifbdunno.lst,dunno,$$3)) { writeini %ifbdir $+ \ $+ ifbdunno.lst dunno $$3 $readini(%ifbdir $+ \ $+ ifbdunno.lst,dunno,$$3) $nick }
}
if ((%ifbbotreplyalias != $null) && ($gettok(%ifbbotreplyalias,1,32) == $nick)) {
msg %ifbreplychan No Factoid Match
unset %ifbbotaskanswer | unset %ifbbotasknick | unset %ifbbotfactoidprocessing | unset %ifbbotreplyalias | unset %ifbreplychan
.timerifbbotaskalias off
}
}
}
alias -l ifbbotaskreply {
if (%ifbbotaskanswer != yes) { msg %ifbreplychan No Factoid Match | unset %ifbbotasknick | unset %ifbreplychan | unset %ifbbotfactoidprocessing | unset %ifbbotaskasked }
else { unset %ifbbotaskanswer | unset %ifbreplychan | unset %ifbbotasknick | unset %ifbbotfactoidprocessing | unset %ifbbotaskasked }
}
alias -l ifbbotaskalias { msg $$1 No Factoid Match | unset %ifbbotaskalias }
;This piece of code gives a reply to the dns command
on *:DNS:{
if (%dnsreplychan == $null) { return }
var %ifbdns = $dns(0)
if ($dns(%ifbdns).ip == 0) { msg %dnsreplychan Unknown Machine Name | unset %dnsreplychan | return }
msg %dnsreplychan $dns(%ifbdns).addr Is $dns(%ifbdns).ip
unset %dnsreplychan
return
}
;This is the majority coding making all the functions of the bot
;I realise the code is sluggish sloppy and damn well 'newbie' buy hey im sluggish
;sloppy and a damn 'newbie' :p If anyone has any other ways of doing things quicker better looking
;and more effective e-mail me because I would /love/ to know...
on *:text:$($me $+ *):#: {
if ($right($1,1) == $chr(44)) || ($right($1,1) == $chr(58)) { ifbstart $1- | return }
}
;This checks and blocks forbidden factoids.
alias -l ifbstart {
if ($ifbisadmin == $true) || ($ifbismaster(ignore) == $true) { ifbbegin $1- | return }
if (%ifblobotomy == enabled) { return }
if ($ifbismaster(forbid) == $true) { ifbbegin $1- | return }
if ($ifbflood == $true) { set -u $+ %ifbfloodignoretime % $+ ifblobotomy enabled }
var %ifbforbidwords = $1-, %ifbforbidnum = $ini(%ifbdir $+ \ $+ %ifbconfigfile,forbid,0), %ifbforbidchecked = 0
while (%ifbforbidchecked < %ifbforbidnum) {
inc %ifbforbidchecked 1
var %ifbforbidword = $ini(%ifbdir $+ \ $+ %ifbconfigfile,forbid,%ifbforbidchecked)
if (%ifbforbidword isin %ifbforbidwords) || (%ifbforbidword iswm %ifbforbidwords) {
var %ifbforbidnum2 = $ini(%ifbdir $+ \ $+ %ifbconfigfile,forbid-except,0), %ifbforbidchecked2 = 0
while (%ifbforbidchecked2 < %ifbforbidnum2) {
inc %ifbforbidchecked2 1
var %ifbforbidexcept = $ini(%ifbdir $+ \ $+ %ifbconfigfile,forbid-except,%ifbforbidchecked2)
var %ifbforbidexceptnum = $wildtok(%ifbforbidwords,%ifbforbidexcept,0,32)
var %ifbforbidwords2 = %ifbforbidwords
if ($wildtok(%ifbforbidwords,%ifbforbidexcept,0,32) > 1) {
while ($wildtok(%ifbforbidwords,%ifbforbidexcept,0,32) > 0) {
inc %ifbdforbidexceptchecked 1
var %ifbforbidwords = $remove(%ifbforbidwords,$wildtok(%ifbforbidwords,%ifbforbidexcept,1,32))
}
}
if ($wildtok(%ifbforbidwords,%ifbforbidexcept,0,32) != 0) { var %ifbforbidwords = $remove(%ifbforbidwords,$wildtok(%ifbforbidwords,%ifbforbidexcept,1,32)) }
}
}
if (%ifbforbidword isin %ifbforbidwords) || (%ifbforbidword iswm %ifbforbidwords) { ifbforbidden $1- | return }
}
ifbbegin $1-
}
;All the other functions and cool gizmo things you find in InfoBloot
alias -l ifbbegin {
if ($ifbisadmin == $true) || ($ifbismaster(hacklog) == $true) { goto ifbcommands }
if (%ifbhacklog == enabled) {
if ($ifbhackattempt($1-) == $true) { msg $chan Forbidden Identifier/Variable Detected | return }
}
:ifbcommands
if ($strip($2) == hacklog) || ($strip($2) == hacklog,) { ifbhacklog $1- | return }
if ($strip($2) == lock) || ($strip($2) == lock,) { ifblock $1- | return }
if ($strip($2) == unlock) || ($strip($2) == unlock,) { ifbunlock $1- | return }
if ($strip($2) == forget) || ($strip($2) == forget,) { ifbforget $1- | return }
if ($strip($2) == forgetall) || ($strip($2) == forgetall,) { ifbforgetall $1- | return }
if ($strip($2) == clear) || ($strip($2) == clear,) { ifbclearfactoids $1- | return }
if ($strip($2) == factinfo) || ($strip($2) == factinfo,) { ifbfactinfo $1- | return }
if ($strip($2) == wantnick) || ($strip($2) == wantnick,) { ifbwantnick $1- | return }
if ($strip($2) == op) || ($strip($2) == op,) { ifbop $1- | return }
if ($strip($2) == deop) || ($strip($2) == deop,) { ifbdeop $1- | return }
if ($strip($2) == voice) || ($strip($2) == voice,) { ifbvoice $1- | return }
if ($strip($2) == devoice) || ($strip($2) == devoice,) { ifbdevoice $1- | return }
if ($strip($2) == halfop) || ($strip($2) == halfop,) { ifbhalfop $1- | return }
if ($strip($2) == dehalfop) || ($strip($2) == dehalfop,) { ifbdehalfop $1- | return }
if ($strip($2) == mode) || ($strip($2) == mode,) { ifbmode $1- | return }
if ($strip($2) == join) || ($strip($2) == join,) { ifbjoin $1- | return }
if ($strip($2) == part) || ($strip($2) == part,) { ifbpart $1- | return }
if ($strip($2) == rejoin) || ($strip($2) == rejoin,) { ifbrejoin $1- | return }
if ($strip($2) == kick) || ($strip($2) == kick,) { ifbkick $1- | return }
if ($strip($2) == ban) || ($strip($2) == ban,) { ifbban $1- | return }
if ($strip($2) == unban) || ($strip($2) == unban,) { ifbunban $1- | return }
if ($strip($2) == say) || ($strip($2) == say,) { ifbsay $1- | return }
if ($strip($2) == describe) || ($strip($2) == describe,) { ifbdescribe $1- | return }
if ($strip($2) == invite) || ($strip($2) == invite,) { ifbinvite $1- | return }
if ($strip($2) == ignore) || ($strip($2) == ignore,) { ifbignore $1- | return }
if ($strip($2) == unignore) || ($strip($2) == unignore,) { ifbunignore $1- | return }
if ($strip($2) == quit) || ($strip($2) == quit,) { ifbquit $1- | return }
if ($strip($2) == announce) || ($strip($2) == announce,) { ifbannounce $1- | return }
if ($strip($2) == factnum) || ($strip($2) == factnum,) { ifbfactnum $1- | return }
if ($strip($2) == forbid) || ($strip($2) == forbid,) { ifbforbid $1- | return }
if ($strip($2) == block) || ($strip($2) == block,) { ifbblock $1- | return }
if ($strip($2) == unblock) || ($strip($2) == unblock,) { ifbunblock $1- | return }
if ($strip($2) == updatecheck) || ($strip($2) == updatecheck,) { ifbupdatecheck $1- | return }
if ($strip($2) == addons) || ($strip($2) == addons,) { ifbaddons $1- | return }
if ($strip($2) == backup) || ($strip($2) == backup,) { ifbebackup $1- | return }
if ($strip($2) == commands) || ($strip($2) == commands,) { ifbcommands $1- | return }
if ($strip($2) == nickometer) || ($strip($2) == nickometer,) { ifbnickometer $1- | return }
if ($strip($2) == lobotomy) || ($strip($2) == lobotomy,) { ifblobotomy $1- | return }
if ($strip($2) == unlobotomy) || ($strip($2) == unlobotomy,) { ifbunlobotomy $1- | return }
if ($strip($2) == tell) || ($strip($2) == tell,) { ifbtell $1- | return }
if ($strip($2) == status) || ($strip($2) == status,) { ifbstatus $1- | return }
if ($strip($2) == encrypt) || ($strip($2) == encrypt,) { ifbencrypt $1- | return }
if ($strip($2) == decrypt) || ($strip($2) == decrypt,) { ifbdecrypt $1- | return }
if ($strip($2) == calc) || ($strip($2) == calc,) || ($strip($2) == calculate) || ($strip($2) == calculate,) { ifbcalculate $1- | return }
if ($strip($2) == date) || ($strip($2) == date,) { ifbdate $1- | return }
if ($strip($2) == time) || ($strip($2) == time,) { ifbtime $1- | return }
if ($strip($2) == dns) || ($strip($2) == dns,) { ifbdns $1- | return }
if ($strip($2) == help) || ($strip($2) == help,) { ifbhelpnick $1- | return }
if ($strip($2) == hi) || ($strip($2) == hello) { ifbhi $1- | return }
if ($strip($2) == stats) || ($strip($2) == stats,) { ifbstats $1- | return }
if ($strip($2) == version) || ($strip($2) == version,) { ifbversion $1- | return }
if ($isalias(ifbaddon_ $+ $replace($2,$chr(44),$null)) == $true) { ifbaddon_ $+ $replace($2,$chr(44),$null) $3- | return }
if ($strip($2) == karma) || ($strip($2) == karma,) { ifbkarma $1- | return }
if ($strip($2) == karmaset) || ($strip($2) == karmaset,) { set %ifbmultinum $calc($0 - 1) | ifbkarmaset $1- | return }
if ($right($2,2) == ++) { set %ifbmultinum 2 | ifbkarma++ $1- | return }
if ($right($2,2) == --) { set %ifbmultinum 2 | ifbkarma-- $1- | return }
if (++ isin $3-) { set %ifbmultinum $calc($findtok($1-7,++,1,32)-1) | ifbkarma++ $1- | return }
if (-- isin $3-) { set %ifbmultinum $calc($findtok($1-7,--,1,32)-1) | ifbkarma-- $1- | return }
if ($strip($2) == lockkarma) || ($strip($2) == lockkarma,) { ifblockkarma $1- | return }
if ($strip($2) == unlockkarma) || ($strip($2) == unlockkarma,) { ifbunlockkarma $1- | return }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),blocked) == true) || ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),blocked) == true) { return }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),null) == true) { return }
if ($strip($2) == no) || ($strip($2) == no,) {
if ($findtok($4-8,is,1,32) != $null) { set %ifbfactoidtype is | set %ifbfactoidchange true | set %ifbmultinum $calc($findtok($1-7,is,1,32)-1) | ifbsetfactoid $1- | return }
if ($findtok($4-8,are,1,32) != $null) { set %ifbfactoidtype are | set %ifbfactoidchange true | set %ifbmultinum $calc($findtok($1-7,are,1,32)-1) | ifbsetfactoid $1- | return }
if ($findtok($4-8,was,1,32) != $null) { set %ifbfactoidtype was | set %ifbfactoidchange true | set %ifbmultinum $calc($findtok($1-7,was,1,32)-1) | ifbsetfactoid $1- | return }
if ($findtok($4-8,can,1,32) != $null) { set %ifbfactoidtype can | set %ifbfactoidchange true | set %ifbmultinum $calc($findtok($1-7,can,1,32)-1) | ifbsetfactoid $1- | return }
if ($findtok($4-8,has,1,32) != $null) { set %ifbfactoidtype has | set %ifbfactoidchange true | set %ifbmultinum $calc($findtok($1-7,has,1,32)-1) | ifbsetfactoid $1- | return }
if ($findtok($4-8,will,1,32) != $null) { set %ifbfactoidtype will | set %ifbfactoidchange true | set %ifbmultinum $calc($findtok($1-7,will,1,32)-1) | ifbsetfactoid $1- | return }
else { msg $chan Please Include A Delimeter And A Factoid | return }
}
if ($findtok($3-7,is,1,32) != $null) { set %ifbfactoidtype is | set %ifbmultinum $calc($findtok($1-7,is,1,32)-1) | ifbsetfactoid $1- | return }
if ($findtok($3-7,are,1,32) != $null) { set %ifbfactoidtype are | set %ifbmultinum $calc($findtok($1-7,are,1,32)-1) | ifbsetfactoid $1- | return }
if ($findtok($3-7,was,1,32) != $null) { set %ifbfactoidtype was | set %ifbmultinum $calc($findtok($1-7,was,1,32)-1) | ifbsetfactoid $1- | return }
if ($findtok($3-7,can,1,32) != $null) { set %ifbfactoidtype can | set %ifbmultinum $calc($findtok($1-7,can,1,32)-1) | ifbsetfactoid $1- | return }
if ($findtok($3-7,has,1,32) != $null) { set %ifbfactoidtype has | set %ifbmultinum $calc($findtok($1-7,has,1,32)-1) | ifbsetfactoid $1- | return }
if ($findtok($3-7,will,1,32) != $null) { set %ifbfactoidtype will | set %ifbmultinum $calc($findtok($1-7,will,1,32)-1) | ifbsetfactoid $1- | return }
if ($strip($2) == $null) { msg $chan Please Enter A Command $nick | return }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($2-,$chr(32),$chr(95)),name) != $null) {
if ($chr(124) isin $readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($2-,$chr(32),$chr(95)),factoid)) {
if ((($3 != $null) || ($chr(95) isin $2-)) && (%ifbmultifactoid != enabled)) { msg $chan Unknown Factoid/Command | return }
var %ifbreadfactoidline = $readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($2-,$chr(32),$chr(95)),factoid)
var %ifbfactoidlinepicked = $rand(1,$calc($count(%ifbreadfactoidline,$chr(124)) + 1))
if (%ifbfactoidlinepicked <= $count(%ifbreadfactoidline,$chr(124))) { var %ifbsayfactoidline = $left($left(%ifbreadfactoidline,$pos(%ifbreadfactoidline,$chr(124),%ifbfactoidlinepicked)),-1) }
else { var %ifbsayfactoidline = %ifbreadfactoidline }
if ($chr(124) isin %ifbsayfactoidline) { var %ifbsayfactoidline = $eval($remove($right($right(%ifbsayfactoidline,-3),- $+ $pos($right(%ifbsayfactoidline,-3),$chr(124),$pos($right(%ifbsayfactoidline,-3),$chr(124),0))),$chr(124)),2) }
if (%ifbfactoidlinepicked == 1) {
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($2-,$chr(32),$chr(95)),reply) == true) { msg $chan %ifbsayfactoidline }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($2-,$chr(32),$chr(95)),action) == true) { describe $chan %ifbsayfactoidline }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($2-,$chr(32),$chr(95)),alias) == true) {
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace(%ifbsayfactoidline,$chr(32),$chr(95)),name),$chr(32),$chr(95)),name) == $null) { msg $chan Unknown Factoid/Command }
elseif ($chr(124) isin $readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace(%ifbsayfactoidline,$chr(32),$chr(95)),name),$chr(32),$chr(95)),factoid)) { msg $chan Unknown Factoid/Command }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace(%ifbsayfactoidline,$chr(32),$chr(95)),name),$chr(32),$chr(95)),reply) == true) { msg $chan $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace(%ifbsayfactoidline,$chr(32),$chr(95)),name),$chr(32),$chr(95)),factoid) }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace(%ifbsayfactoidline,$chr(32),$chr(95)),name),$chr(32),$chr(95)),action) == true) { describe chan $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace(%ifbsayfactoidline,$chr(32),$chr(95)),name),$chr(32),$chr(95)),factoid) }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace(%ifbsayfactoidline,$chr(32),$chr(95)),name),$chr(32),$chr(95)),alias) == true) { msg $chan Unknown Factoid/Command }
else { msg $chan $iif(%ifbcustombotreply == enabled,$readini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$ini(%ifbdir,$rand(1,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,0)))) ,Factoid:)$readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($2-,$chr(32),$chr(95)),name) $readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($2-,$chr(32),$chr(95)),type) $readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace(%ifbsayfactoidline,$chr(32),$chr(95)),name),$chr(32),$chr(95)),factoid) }
}
else { msg $chan $iif(%ifbcustombotreply == enabled,$readini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$rand(1,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,0)))),Factoid:) $replace($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($2-,$chr(32),$chr(95)),name),$chr(95),$chr(32)) $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),type) %ifbsayfactoidline }
}
else {
if ($gettok(%ifbsayfactoidline,1,32) == <reply>) { msg $chan $gettok(%ifbsayfactoidline,2-,32) }
elseif ($left(%ifbsayfactoidline,7) == <reply>) { msg $chan $right(%ifbsayfactoidline,-7) }
elseif ($gettok(%ifbsayfactoidline,1,32) == <action>) { describe $chan $gettok(%ifbsayfactoidline,2-,32) }
elseif ($left($remove(%ifbsayfactoidline,$chr(32)),8) == <action>) { describe $chan $right(%ifbsayfactoidline,-8) }
elseif ($gettok(%ifbsayfactoidline,1,32) == <alias>) || ($left($remove(%ifbsayfactoidline,$chr(32)),7) == <alias>) {
var %ifbfactoidlinealias = $iif($gettok(%ifbsayfactoidline,1,32) == <alias>,$gettok(%ifbsayfactoidline,2-,32),$right(%ifbsayfactoidline,-7))
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace(%ifbfactoidlinealias,$chr(32),$chr(95)),name) == $null) { msg $chan Unknown Factoid/Command }
elseif ($chr(124) isin $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace(%ifbfactoidlinealias,$chr(32),$chr(95)),factoid)) { msg $chan Unknown Factoid/Command }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace(%ifbfactoidlinealias,$chr(32),$chr(95)),reply) == true) { msg $chan $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace(%ifbfactoidlinealias,$chr(32),$chr(95)),factoid) }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace(%ifbfactoidlinealias,$chr(32),$chr(95)),action) == true) { describe chan $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace(%ifbfactoidlinealias,$chr(32),$chr(95)),factoid) }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace(%ifbfactoidlinealias,$chr(32),$chr(95)),alias) == true) { msg $chan Unknown Factoid/Command }
else { msg $chan $iif(%ifbcustombotreply == enabled,$readini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$rand(1,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,0)))),Factoid:) $replace($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($2-,$chr(32),$chr(95)),name),$chr(95),$chr(32)) $readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($2-,$chr(32),$chr(95)),type) $readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace(%ifbfactoidlinealias,$chr(32),$chr(95)),factoid) }
}
else { msg $chan $iif(%ifbcustombotreply == enabled,$readini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$rand(1,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,0)))),Factoid:) $replace($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($2-,$chr(32),$chr(95)),name),$chr(95),$chr(32)) $readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($2-,$chr(32),$chr(95)),type) %ifbsayfactoidline }
}
writeini -n %ifbdir $+ \ $+ %ifbinfofile $replace($2-,$chr(32),$chr(95)) requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),requested) + 1)
return
}
if ($3 != $null) || ($chr(95) isin $2-) {
if (%ifbmultifactoid == enabled) {
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),reply) == true) { msg $chan $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),factoid) | writeini -n %ifbdir $+ \ $+ %ifbinfofile $replace($2-,$chr(32),$chr(95)) requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),requested) + 1) }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),action) == true) { describe $chan $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),factoid) | writeini -n %ifbdir $+ \ $+ %ifbinfofile $replace($2-,$chr(32),$chr(95)) requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),requested) + 1) }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),alias) == true) {
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),factoid),$chr(32),$chr(95)),name) == $null) { msg $chan Unknown Factoid/Command }
elseif ($chr(124) isin $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),factoid),$chr(32),$chr(95)),factoid)) { msg $chan Unknown Factoid/Command }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),factoid),$chr(32),$chr(95)),reply) == true) { msg $chan $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),factoid),$chr(32),$chr(95)),factoid) | writeini -n %ifbdir $+ \ $+ %ifbinfofile $replace($2-,$chr(32),$chr(95)) requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),requested) + 1) }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),factoid),$chr(32),$chr(95)),action) == true) { describe $chan $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),factoid),$chr(32),$chr(95)),factoid) | writeini -n %ifbdir $+ \ $+ %ifbinfofile $replace($2-,$chr(32),$chr(95)) requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),requested) + 1) }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),factoid),$chr(32),$chr(95)),alias) == true) { msg $chan Unknown Factoid/Command }
else { msg $chan $iif(%ifbcustombotreply == enabled,$readini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$rand(1,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,0)))),Factoid:) $replace($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($2-,$chr(32),$chr(95)),name),$chr(95),$chr(32)) $readini(%ifbdir $+ \ $+ %ifbinfofile,$readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),factoid),type) $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),factoid),$chr(32),$chr(95)),factoid) | writeini -n %ifbdir $+ \ $+ %ifbinfofile $replace($2-,$chr(32),$chr(95)) requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),requested) + 1) }
}
else { msg $chan $iif(%ifbcustombotreply == enabled,$readini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$rand(1,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,0)))),Factoid:) $replace($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($2-,$chr(32),$chr(95)),name),$chr(95),$chr(32)) $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),type) $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),factoid) | writeini -n %ifbdir $+ \ $+ %ifbinfofile $replace($2-,$chr(32),$chr(95)) requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),requested) + 1) | return }
}
else { msg $chan Unknown Factoid/Command | return }
}
else {
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$2,reply) == true) { msg $chan $readini(%ifbdir $+ \ $+ %ifbinfofile,$2,factoid) | writeini -n %ifbdir $+ \ $+ %ifbinfofile $2 requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,$2,requested) + 1) }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,$2,action) == true) { describe $chan $readini(%ifbdir $+ \ $+ %ifbinfofile,$2,factoid) | writeini -n %ifbdir $+ \ $+ %ifbinfofile $2 requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,$2,requested) + 1) }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,$2,alias) == true) {
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$2,factoid),$chr(32),$chr(95)),name) == $null) { msg $chan Unknown Factoid/Command }
elseif ($chr(124) isin $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$2,factoid),$chr(32),$chr(95)),factoid)) { msg $chan Unknown Factoid/Command }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$2,factoid),$chr(32),$chr(95)),reply) == true) { msg $chan $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$2,factoid),$chr(32),$chr(95)),factoid) | writeini -n %ifbdir $+ \ $+ %ifbinfofile $2 requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,$2,requested) + 1) }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$2,factoid),$chr(32),$chr(95)),action) == true) { describe $chan $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$2,factoid),$chr(32),$chr(95)),factoid) | writeini -n %ifbdir $+ \ $+ %ifbinfofile $2 requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,$2,requested) + 1) }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$2,factoid),$chr(32),$chr(95)),alias) == true) { msg $chan Unknown Factoid/Command }
else { msg $chan $iif(%ifbcustombotreply == enabled,$readini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$rand(1,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,0)))),Factoid:) $readini(%ifbdir $+ \ $+ %ifbinfofile,n,$2,name) $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$2,factoid),$chr(32),$chr(95)),type) $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$2,factoid),$chr(32),$chr(95)),factoid) | writeini -n %ifbdir $+ \ $+ %ifbinfofile $2 requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,$2,requested) + 1) }
}
else { msg $chan $iif(%ifbcustombotreply == enabled,$readini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$rand(1,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,0)))),Factoid:) $readini(%ifbdir $+ \ $+ %ifbinfofile,n,$2,name) $readini(%ifbdir $+ \ $+ %ifbinfofile,$2,type) $readini(%ifbdir $+ \ $+ %ifbinfofile,$2,factoid) | writeini -n %ifbdir $+ \ $+ %ifbinfofile $2 requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,$2,requested) + 1) }
}
else { msg $chan Unknown Factoid/Command | return }
}
elseif (%ifbbotask == enabled) {
if (%ifbbotfactoidprocessing == true) { msg $chan Factoid Processing - Please Try Again In A Few Seconds | return }
.timerifbbotaskreply 1 15 ifbbotaskreply
var %ifbbotasknumber = 1, %ifbbottotalnumber = $calc($ini(%ifbdir $+ \ $+ %ifbconfigfile,botask,0) + 1)
set %ifbbotfactoidprocessing true
set %ifbreplychan $chan
set %ifbbotasknick $nick
msg $chan Factoid Not In Database, Asking Other Bots...
while (%ifbbotasknumber < %ifbbottotalnumber) {
if ($readini(%ifbdir $+ \ $+ %ifbconfigfile,botask,$ini(%ifbdir $+ \ $+ %ifbconfigfile,botask,%ifbbotasknumber)) != $null) {
msg $readini(%ifbdir $+ \ $+ %ifbconfigfile,botask,$ini(%ifbdir $+ \ $+ %ifbconfigfile,botask,%ifbbotasknumber)) :INFOBOT:QUERY < $+ $nick $+ > $$2 | var %ifbbotaskaskbot = %ifbbotaskaskbot $readini(%ifbdir $+ \ $+ %ifbconfigfile,botask,$ini(%ifbdir $+ \ $+ %ifbconfigfile,botask,%ifbbotasknumber))
inc %ifbbotasknumber 1
}
}
set -u15 %ifbbotaskasked %ifbbotaskaskbot
return
}
else {
if (%ifbcustombotreply == enabled) { msg $chan $readini(%ifbdir $+ \ $+ %ifbconfigfile,unknownreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,unknownreply,$rand(1,$ini(%ifbdir $+ \ $+ %ifbconfigfile,unknownreply,0)))) | return }
else { msg $chan Unknown Factoid/Command | return }
}
}
alias ifbhackattempt {
var %hacklogwords = $strip($1-), %hacklognum = $numtok($1-,32), %hacklogchecked = 0
while (%hacklogchecked < %hacklognum) {
if ($wildtok(%hacklogwords, <reply>!*, 0, 32) > 0) || ($left($gettok(%hacklogwords,$calc($findtok(%hacklogwords,<reply>,1,32) + 1),32),1) == $chr(33)) { write %ifbdir $+ \ $+ %ifbhacklogfile ::> $+ $date $+ / $time $+ <:: << $+ $nick $+ >> << $+ $address($nick,1) $+ >> ~~ $replace($1-,$,[$],%,[%]) | return $true }
if ($chr(36) isin $gettok(%hacklogwords,1,32)) || ($chr(37) isin $gettok(%hacklogwords,1,32)) {
if ($readini(%ifbdir $+ \ $+ %ifbconfigfile,hacklog,$gettok(%hacklogwords,1,32)) == enabled) { var %hacklogwords = $right(%hacklogwords,$calc($calc($len(%hacklogwords) - 1) - $len($gettok(%hacklogwords,1,32)))) | inc %hacklogchecked 1 }
elseif ($gettok(%hacklogwords,1,32) == $chr(36) $+ $chr(43)) { var %hacklogwords = $right(%hacklogwords,$calc($calc($len(%hacklogwords) - 1) - $len($gettok(%hacklogwords,1,32)))) | inc %hacklogchecked 1 }
elseif ($readini(%ifbdir $+ \ $+ %ifbconfigfile,hacklog,$remove($gettok(%hacklogwords,1,32),<reply>,<action>)) == enabled) { var %hacklogwords = $right(%hacklogwords,$calc($calc($len(%hacklogwords) - 1) - $len($gettok(%hacklogwords,1,32)))) | inc %hacklogchecked 1 }
elseif ($chr(124) isin $gettok(%hacklogwords,1,32)) {
var %ifbhacklogpipenum = $count($gettok(%hacklogwords,1,32),$chr(124))
var %ifbhacklogpipewords = $gettok(%hacklogwords,1,32)
var %ifbhacklogpipechecked = 0
while (%ifbhacklogpipechecked < %ifbhacklogpipenum) {
inc %ifbhacklogpipechecked 1
if ($readini(%ifbdir $+ \ $+ %ifbconfigfile,hacklog,$left(%ifbhacklogpipewords,$calc($pos(%ifbhacklogpipewords,$chr(124),1) - 1))) == enabled) { var %ifbhacklogpipesafe = true }
else { var %ifbhacklogpipesafe = false }
var %ifbhacklogpipewords = $right(%ifbhacklogpipewords,- $+ $pos(%ifbhacklogpipewords,$chr(124),1))
}
if (%ifbhacklogpipesafe == true) { var %hacklogwords = $right(%hacklogwords,$calc($calc($len(%hacklogwords) - 1) - $len($gettok(%hacklogwords,1,32)))) | inc %hacklogchecked 1 }
else { return $false }
}
elseif (($readini(%ifbdir $+ \ $+ %ifbconfigfile,hacklog,$eval($nick,0)) == enabled) && ($remove($gettok(%hacklogwords,1,32),<reply>,<action>) == $eval($who,0))) { var %hacklogwords = $right(%hacklogwords,$calc($calc($len(%hacklogwords) - 1) - $len($gettok(%hacklogwords,1,32)))) | inc %hacklogchecked 1 }
elseif (($readini(%ifbdir $+ \ $+ %ifbconfigfile,hacklog,$eval($who,0)) == enabled) && ($remove($gettok(%hacklogwords,1,32),<reply>,<action>) == $eval($nick,0))) { var %hacklogwords = $right(%hacklogwords,$calc($calc($len(%hacklogwords) - 1) - $len($gettok(%hacklogwords,1,32)))) | inc %hacklogchecked 1 }
else { write %ifbdir $+ \ $+ %ifbhacklogfile ::> $+ $date $+ / $time $+ <:: << $+ $nick $+ >> << $+ $address($nick,1) $+ >> ~~ $replace($1-,$,[$],%,[%]) | return $true }
}
else { var %hackloglogged = false, %hacklogwords = $right(%hacklogwords,$calc($calc($len(%hacklogwords) - 1) - $len($gettok(%hacklogwords,1,32)))) | inc %hacklogchecked 1 }
}
return $false
}
;$nick alternative
alias -l who {
return $nick
}
;returns $true if user is the master admin and $false if they arn't
alias ifbisadmin {
if ((%ifbmasteradmin == $nick) && (%ifbmasteradmin-host iswm $mask($right($gettok($rawmsg,1,32),-1),4) )) { return $true }
else { return $false }
}
;returns $true if user is a master with X privileges and $false if they arn't
alias ifbismaster {
if (($1 isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$nick)) && ($readini(%ifbdir $+ \ $+ %ifbconfigfile,masters-host,$nick) iswm $mask($right($gettok($rawmsg,1,32),-1),4) )) { return $true }
else { return $false }
}
alias -l ifbhacklog {
if ($ifbisadmin == $true) || ($ifbismaster(hacklog) == $true) {
if ($3 == entries) { msg $chan There $iif($lines(%ifbdir $+ \ $+ %ifbhacklogfile) != 1,Are,Is) $lines(%ifbdir $+ \ $+ %ifbhacklogfile) Hacklog $iif($lines(%ifbdir $+ \ $+ %ifbhacklogfile) != 1,Entries,Entry) | return }
if ($3 == clear) { write -c %ifbdir $+ \ $+ %ifbhacklogfile | msg $chan Hacklog Cleared | return }
if ($3 == read) {
if ($4 != $null) { msg $chan $read(%ifbdir $+ \ $+ %ifbhacklogfile,$4) | return }
else { msg $chan Please Select An Entry To Read | return }
}
if ($3 == enable) { set %ifbhacklog enabled | msg $chan HackLog Enabled | return }
if ($3 == disable) { unset %ifbhacklog | msg $chan HackLog Disabled | return }
else { msg $chan Please Include Entries/Read/Clear/Enable/Disable | return }
}
else { msg $chan I Am Not Alloed To Use The Hacklog Function $nick | return }
}
alias -l ifbcalculate {
if (%ifbcalculate == enabled) {
if ($len($3-) > 15) { msg $chan Sum Exceeds The 15 Character Limit }
else { msg $chan $calc($replace($3-,pi,$pi)) }
}
else { return }
}
alias -l ifbdate {
if (%ifbdatetime == enabled) { msg $chan Server Date: $date }
else { return }
}
alias -l ifbtime {
if (%ifbdatetime == enabled) { msg $chan Server Time: $time }
else { return }
}
alias -l ifblock {
if (%ifblocked == enabled) {
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($3-,$chr(32),$chr(95)),name) == $null) { msg $chan Factoid ' $+ $3- $+ ' Does Not Exist $nick | return }
if ($ifbisadmin == $true) || ($ifbismaster(lock) == $true) { writeini -n %ifbdir $+ \ $+ %ifbinfofile $replace($3-,$chr(32),$chr(95)) locked true | msg $chan Factoid Locked $nick }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($3-,$chr(32),$chr(95)),author) == $nick) { writeini -n %ifbdir $+ \ $+ %ifbinfofile $replace($3-,$chr(32),$chr(95)) locked true | msg $chan Factoid Locked $nick }
else { msg $chan Cannot Lock Factoids $nick }
}
else { return }
}
alias -l ifbunlock {
if (%ifblocked == enabled) {
if ($ifbisadmin == $true) || ($ifbismaster(unlock) == $true) { writeini -n %ifbdir $+ \ $+ %ifbinfofile $replace($3-,$chr(32),$chr(95)) locked false | msg $chan Factoid Unlocked $nick }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($3-,$chr(32),$chr(95)),author) == $nick) { writeini -n %ifbdir $+ \ $+ %ifbinfofile $replace($3-,$chr(32),$chr(95)) locked false | msg $chan Factoid Unlocked $nick }
else { msg $chan Cannot Unlock Factoid $nick }
}
else { return }
}
alias -l ifbsetfactoid {
if (%ifbsetfactoid == enabled) {
if ($findtok($1-,%ifbfactoidtype,1,32) != 3) {
if (%ifbmultifactoid != enabled) { msg $chan Please Include A Delimeter And A Factoid | return }
if ($gettok($1-,$calc(%ifbmultinum + 2),32) == also) { ifbalso $1- | return }
elseif ($gettok($1-,$calc(%ifbmultinum + 2),32) == <reply>) { var %ifbfactoidformat = reply }
elseif ($left($gettok($1-,$calc(%ifbmultinum + 2),32),7) == <reply>) { var %ifbfactoidformat = reply | var %ifbfactoidchop 7 }
elseif ($gettok($1-,$calc(%ifbmultinum + 2),32) == <action>) { var %ifbfactoidformat = action }
elseif ($left($gettok($1-,$calc(%ifbmultinum + 2),32),8) == <action>) { var %ifbfactoidformat = action | var %ifbfactoidchop 8 }
elseif ($gettok($1-,$calc(%ifbmultinum + 2),32) == <alias>) { var %ifbfactoidformat = alias }
elseif ($left($gettok($1-,$calc(%ifbmultinum + 2),32),7) == <alias>) { var %ifbfactoidformat = alias | var %ifbfactoidchop 7 }
elseif ($gettok($1-,$calc(%ifbmultinum + 2),32) == $null) { msg $chan Please Include A Delimeter And A Factoid | return }
else { var %ifbfactoidformat = normal }
if (%ifbfactoidchange == true) {
var %ifbmn = $replace($gettok($1-,3- $+ %ifbmultinum,32),$chr(32),$chr(95))
if ($chr(36) isin %ifbmn) || ($chr(37) isin %ifbmn) { msg $chan Factoid Names May Not Contain Identifiers }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,blocked) == true) { msg $chan Cannot Alter Blocked Factoids $nick | unset %ifbfactoidchange | unset %ifbfactoidtype | return }
if (($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,name) == $null) && ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,null) != true)) { msg $chan Factoid ' $+ $replace(%ifbmn,$chr(95),$chr(32)) $+ ' Does Not Exist $nick | unset %ifbfactoidtype | unset %ifbfactoidchange | return }
if (%ifbfactoidchop isnum) { var %ifbfactoidwrite = $right($gettok($1-,$calc(%ifbmultinum + 2) $+ -,32),- $+ %ifbfactoidchop) }
else { var %ifbfactoidwrite = $gettok($1-,$calc(%ifbmultinum + $iif(%ifbfactoidformat != normal,3,2)) $+ -,32) }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,blocked) == true) { msg $chan Cannot Alter Blocked Factoids $nick | unset %ifbfactoidchange | unset %ifbfactoidtype | return }
if ($ifbisadmin == $true) || ($ifbismaster(overrule) == $true) {
if (($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,factoid) == $gettok($1-,$calc(%ifbmultinum + $iif(%ifbfactoidformat != normal,3,2)) $+ -,32) && ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,$remove($gettok($1-,$calc(%ifbmultinum + 2),32),$chr(60),$chr(62))) == true))) { msg $chan I Already Had ' $+ $replace(%ifbmn,$chr(95),$chr(32)) $+ ' That Way $nick | unset %ifbfactoidtype | unset %ifbfactoidchange | return }
else { remini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn factoid %ifbfactoidwrite | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn name %ifbmn | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn type %ifbfactoidtype | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn author $nick | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn locked false | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn date $date | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn time $time | inc %ifbsetnumber 1 | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn karma 5 | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn karmalocked false | $iif(%ifbfactoidformat != normal, writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn %ifbfactoidformat true) | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn requested 0 }
}
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,author) == $nick) {
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,factoid) == $gettok($1-,$calc(%ifbmultinum + $iif(%ifbfactoidformat != normal,3,2)) $+ -,32)) { msg $chan I Already Had ' $+ $replace(%ifbmn,$chr(95),$chr(32)) $+ ' That Way $nick | unset %ifbfactoidtype | unset %ifbfactoidchange | return }
remini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn factoid %ifbfactoidwrite | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn name %ifbmn | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn type %ifbfactoidtype | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn author $nick | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn locked false | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn date $date | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn time $time | inc %ifbsetnumber 1 | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn karma 5 | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn karmalocked false | $iif(%ifbfactoidformat != normal, writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn %ifbfactoidformat true) | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn requested 0
}
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,locked) == true) { msg $chan Cannot Alter Locked Factoids $nick | unset %ifbfactoidtype | unset %ifbmultinum | unset %ifbfactoidtype | unset %ifbfactoidchange | return }
elseif (%ifbfactoidwrite == $null) { writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn null true | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn author $nick | msg $chan Ok $nick | unset %ifbfactoidtype | unset %ifbfactoidchange | return }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,factoid) == $gettok($1-,$calc(%ifbmultinum + $iif(%ifbfactoidformat != normal,3,2),32))) { msg $chan I Already Had ' $+ $replace(%ifbmn,$chr(95),$chr(32)) $+ ' That Way $nick | unset %ifbfactoidtype | unset %ifbfactoidchange | return }
else { remini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn factoid %ifbfactoidwrite | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn name %ifbmn | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn type %ifbfactoidtype | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn author $nick | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn locked false | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn date $date | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn time $time | inc %ifbsetnumber 1 | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn karma 5 | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn karmalocked false | $iif(%ifbfactoidformat != normal, writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn %ifbfactoidformat true) | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn requested 0 }
msg $chan Ok $nick
unset %ifbfactoidchange
unset %ifbfactoidtype
if ($readini(%ifbdir $+ \ $+ ifbdunno.lst,dunno,%ifbmn) != $null) {
var %ifbbotaskdunnoanswernum = $numtok($readini(%ifbdir $+ \ $+ ifbdunno.lst,dunno,%ifbmn),32)
var %ifbbotaskdunnoanswerdone = 0
while (%ifbbotaskdunnoanswerdone < %ifbbotaskdunnoanswernum) {
inc %ifbbotaskdunnoanswerdone 1
.msg $gettok($readini(%ifbdir $+ \ $+ ifbdunno.lst,dunno,%ifbmn),%ifbbotaskdunnoanswerdone,32) :INFOBOT:REPLY < $+ $me $+ > %ifbmn = $+ $readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,type) $+ => $iif(%ifbfactoidformat != normal,< $+ %ifbfactoidformat $+ >,$chr(32)) $+ $readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,factoid)
}
remini %ifbdir $+ \ $+ ifbdunno.lst dunno %ifbmn
}
return
}
var %ifbmn = $replace($gettok($1-,2- $+ %ifbmultinum,32),$chr(32),$chr(95))
if (%ifbfactoidchop isnum) { var %ifbfactoidwrite = $right($gettok($1-,$calc(%ifbmultinum + 2) $+ -,32),- $+ %ifbfactoidchop) }
else { var %ifbfactoidwrite = $gettok($1-,$calc(%ifbmultinum + $iif(%ifbfactoidformat != normal,3,2)) $+ -,32) }
if (%ifbfactoidwrite == $null) { writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn null true | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn author $nick | var %ifbfactoidformat == null }
if (%ifbfactoidformat == null) {
if (%ifbcustombotreply == enabled) { msg $chan $replace($readini(%ifbdir $+ \ $+ %ifbconfigfile,replys,creation),<factoid>,$2) }
else { msg $chan Factoid ' $+ $2 $+ ' Created }
unset %ifbfactoidtype
}
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,name) != $null) || ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,null) == true) { msg $chan Factoid ' $+ $replace(%ifbmn,$chr(95),$chr(32)) $+ ' Already Exists $nick | unset %ifbfactoidtype | unset %ifbmultinum | return }
elseif (($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,blocked) == true) && ($ifbisadmin != $true) && ($ifbismaster(overrule) != $true)) { msg $chan Factoid Blocked $nick | return }
else { remini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn factoid %ifbfactoidwrite | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn name %ifbmn | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn type %ifbfactoidtype | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn author $nick | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn locked false | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn date $date | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn time $time | inc %ifbsetnumber 1 | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn karma 5 | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn karmalocked false | $iif(%ifbfactoidformat != normal, writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn %ifbfactoidformat true) | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn requested 0 | unset %ifbfactoidtype }
if (%ifbcustombotreply == enabled) { msg $chan $replace($readini(%ifbdir $+ \ $+ %ifbconfigfile,replys,creation),<factoid>,$replace(%ifbmn,$chr(95),$chr(32))) | return }
else { msg $chan Factoid ' $+ $replace(%ifbmn,$chr(95),$chr(32)) $+ ' Created | return }
if ($readini(%ifbdir $+ \ $+ ifbdunno.lst,dunno,%ifbmn) != $null) {
var %ifbbotaskdunnoanswernum = $numtok($readini(%ifbdir $+ \ $+ ifbdunno.lst,dunno,%ifbmn),32)
var %ifbbotaskdunnoanswerdone = 0
while (%ifbbotaskdunnoanswerdone < %ifbbotaskdunnoanswernum) {
inc %ifbbotaskdunnoanswerdone 1
.msg $gettok($readini(%ifbdir $+ \ $+ ifbdunno.lst,dunno,%ifbmn),%ifbbotaskdunnoanswerdone,32) :INFOBOT:REPLY < $+ $me $+ > %ifbmn = $+ $readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,type) $+ => $iif(%ifbfactoidformat != normal,< $+ %ifbfactoidformat $+ >,$chr(32)) $+ $readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,factoid)
}
remini %ifbdir $+ \ $+ ifbdunno.lst dunno %ifbmn
}
}
if ($4 == also) { ifbalso $1- | return }
elseif ($4 == <reply>) { var %ifbfactoidformat = reply }
elseif ($left($4,7) == <reply>) { var %ifbfactoidformat = reply | var %ifbfactoidchop 7 }
elseif ($4 == <action>) { var %ifbfactoidformat = action }
elseif ($left($4,8) == <action>) { var %ifbfactoidformat = action | var %ifbfactoidchop 8 }
elseif ($4 == <alias>) { var %ifbfactoidformat = alias }
elseif ($left($4,7) == <alias>) { var %ifbfactoidformat = alias | var %ifbfactoidchop 7 }
elseif ($4 == $null) { msg $chan Please Include A Delimeter And A Factoid | return }
else { var %ifbfactoidformat = normal }
if (%ifbfactoidchange == true) {
if (%ifbfactoidchop isnum) { var %ifbfactoidwrite = $right($5-,- $+ %ifbfactoidchop) }
else { var %ifbfactoidwrite = $iif(%ifbfactoidformat != normal,$6-,$5-) }
if (($readini(%ifbdir $+ \ $+ %ifbinfofile,$3,name) == $null) && ($readini(%ifbdir $+ \ $+ %ifbinfofile,$3,null) != true)) { msg $chan Factoid ' $+ $3 $+ ' Does Not Exist $nick | unset %ifbfactoidtype | unset %ifbfactoidchange | return }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,$3,blocked) == true) { msg $chan Cannot Alter Blocked Factoids $nick | unset %ifbfactoidchange | unset %ifbfactoidtype | return }
elseif ($ifbisadmin == $true) || ($ifbismaster(overrule) == $true) {
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$3,factoid) == %ifbfactoidwrite) { msg $chan I Already Had ' $+ %ifbfactoidwrite $+ ' That Way $nick | unset %ifbfactoidtype | unset %ifbfactoidchange | return }
else { remini -n %ifbdir $+ \ $+ %ifbinfofile $3 | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 factoid %ifbfactoidwrite | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 name $3 | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 type %ifbfactoidtype | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 author $nick | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 locked false | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 date $date | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 time $time | inc %ifbsetnumber 1 | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 karma 5 | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 karmalocked false | $iif(%ifbfactoidformat != normal, writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 %ifbfactoidformat true) | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 requested 0 }
}
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,$3,author) == $nick) {
remini -n %ifbdir $+ \ $+ %ifbinfofile $3 | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 factoid %ifbfactoidwrite | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 name $3 | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 type %ifbfactoidtype | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 author $nick | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 locked false | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 date $date | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 time $time | inc %ifbsetnumber 1 | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 karma 5 | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 karmalocked false | $iif(%ifbfactoidformat != normal, writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 %ifbfactoidformat true) | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 requested 0
}
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,$3,locked) == true) { msg $chan Cannot Alter Locked Factoids $nick | unset %ifbfactoidtype | unset %ifbmultinum | unset %ifbfactoidtype | unset %ifbfactoidchange | return }
elseif (%ifbfactoidwrite == $null) { writeini -n %ifbdir $+ \ $+ %ifbinfofile $iif(%ifbfactoidchange != $null,$4,$3) null true | writeini -n %ifbdir $+ \ $+ %ifbinfofile $iif(%ifbfactoidchange != $null,$4,$3) author $nick | msg $chan Ok $nick | unset %ifbfactoidtype | unset %ifbfactoidchange | return }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,$3,factoid) == %ifbfactoidwrite) { msg $chan I Already Had ' $+ %ifbfactoidwrite $+ ' That Way $nick | unset %ifbfactoidtype | unset %ifbfactoidchange | return }
else { remini -n %ifbdir $+ \ $+ %ifbinfofile $3 | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 factoid %ifbfactoidwrite | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 name $3 | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 type %ifbfactoidtype | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 author $nick | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 locked false | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 date $date | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 time $time | inc %ifbsetnumber 1 | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 karma 5 | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 karmalocked false | $iif(%ifbfactoidformat != normal, writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 %ifbfactoidformat true) | writeini -n %ifbdir $+ \ $+ %ifbinfofile $3 requested 0 }
msg $chan Ok $nick
unset %ifbfactoidchange
unset %ifbfactoidtype
if ($readini(%ifbdir $+ \ $+ ifbdunno.lst,dunno,$3) != $null) {
var %ifbbotaskdunnoanswernum = $numtok($readini(%ifbdir $+ \ $+ ifbdunno.lst,dunno,$3),32)
var %ifbbotaskdunnoanswerdone = 0
while (%ifbbotaskdunnoanswerdone < %ifbbotaskdunnoanswernum) {
inc %ifbbotaskdunnoanswerdone 1
.msg $gettok($readini(%ifbdir $+ \ $+ ifbdunno.lst,dunno,$3),%ifbbotaskdunnoanswerdone,32) :INFOBOT:REPLY < $+ $me $+ > $3 = $+ $readini(%ifbdir $+ \ $+ %ifbinfofile,$3,type) $+ => $iif(%ifbfactoidformat != normal,< $+ %ifbfactoidformat $+ >,$chr(32)) $+ $readini(%ifbdir $+ \ $+ %ifbinfofile,$3,factoid)
}
remini %ifbdir $+ \ $+ ifbdunno.lst dunno $3
}
return
}
if (%ifbfactoidchop isnum) { var %ifbfactoidwrite = $right($4-,- $+ %ifbfactoidchop) }
else { var %ifbfactoidwrite = $iif(%ifbfactoidformat != normal,$5-,$4-) }
if (%ifbfactoidwrite == $null) { writeini -n %ifbdir $+ \ $+ %ifbinfofile $iif(%ifbfactoidchange != $null,$3,$2) null true | writeini -n %ifbdir $+ \ $+ %ifbinfofile $iif(%ifbfactoidchange != $null,$3,$2) author $nick | var %ifbfactoidformat = null }
if (%ifbfactoidformat == null) {
if (%ifbcustombotreply == enabled) { msg $chan $replace($readini(%ifbdir $+ \ $+ %ifbconfigfile,replys,creation),<factoid>,$2) }
else { msg $chan Factoid ' $+ $2 $+ ' Created }
unset %ifbfactoidtype
return
}
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$2,name) != $null) { msg $chan Factoid ' $+ $2 $+ ' Already Exists $nick | unset %ifbfactoidtype | return }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,$2,blocked) == true) { msg $chan Cannot Alter Blocked Factoids $nick | unset %ifbfactoidtype | return }
else { remini -n %ifbdir $+ \ $+ %ifbinfofile $2 | writeini -n %ifbdir $+ \ $+ %ifbinfofile $2 factoid %ifbfactoidwrite | writeini -n %ifbdir $+ \ $+ %ifbinfofile $2 name $2 | writeini -n %ifbdir $+ \ $+ %ifbinfofile $2 type %ifbfactoidtype | writeini -n %ifbdir $+ \ $+ %ifbinfofile $2 author $nick | writeini -n %ifbdir $+ \ $+ %ifbinfofile $2 locked false | writeini -n %ifbdir $+ \ $+ %ifbinfofile $2 date $date | writeini -n %ifbdir $+ \ $+ %ifbinfofile $2 time $time | inc %ifbsetnumber 1 | writeini -n %ifbdir $+ \ $+ %ifbinfofile $2 karma 5 | writeini -n %ifbdir $+ \ $+ %ifbinfofile $2 karmalocked false | $iif(%ifbfactoidformat != normal, writeini -n %ifbdir $+ \ $+ %ifbinfofile $2 %ifbfactoidformat true) | writeini -n %ifbdir $+ \ $+ %ifbinfofile $2 requested 0 | unset %ifbfactoidtype }
if (%ifbcustombotreply == enabled) { msg $chan $replace($readini(%ifbdir $+ \ $+ %ifbconfigfile,replys,creation),<factoid>,$2) }
else { msg $chan Factoid ' $+ $2 $+ ' Created }
if ($readini(%ifbdir $+ \ $+ ifbdunno.lst,dunno,$2) != $null) {
var %ifbbotaskdunnoanswernum = $numtok($readini(%ifbdir $+ \ $+ ifbdunno.lst,dunno,$2),32)
var %ifbbotaskdunnoanswerdone = 0
while (%ifbbotaskdunnoanswerdone < %ifbbotaskdunnoanswernum) {
inc %ifbbotaskdunnoanswerdone 1
.msg $gettok($readini(%ifbdir $+ \ $+ ifbdunno.lst,dunno,$2),%ifbbotaskdunnoanswerdone,32) :INFOBOT:REPLY < $+ $me $+ > $2 = $+ $readini(%ifbdir $+ \ $+ %ifbinfofile,$2,type) $+ => $iif(%ifbfactoidformat != normal,< $+ %ifbfactoidformat $+ >,$chr(32)) $+ $readini(%ifbdir $+ \ $+ %ifbinfofile,$2,factoid)
}
remini %ifbdir $+ \ $+ ifbdunno.lst dunno $2
}
}
else { return }
}
alias -l ifbforget {
if (%ifbforget == enabled) {
if (($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($3-,$chr(32),$chr(95)),name) == $null) && ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($3-,$chr(32),$chr(95)),null) != true)) { msg $chan Factoid ' $+ $3- $+ ' Does Not Exist $nick | return }
if ($ifbisadmin == $true) || ($ifbismaster(overrule) == $true) { remini -n %ifbdir $+ \ $+ %ifbinfofile $replace($3-,$chr(32),$chr(95)) | inc %ifbsetnumber 1 | msg $chan $iif(%ifbcustombotreply == enabled,$replace($readini(%ifbdir $+ \ $+ %ifbconfigfile,replys,deletion),<factoid>,$3-),I Forgot ' $+ $3- $+ ' $nick) | return }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($3-,$chr(32),$chr(95)),blocked) == true) { msg $chan Cannot Alter Blocked Factoids $nick | return }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($3-,$chr(32),$chr(95)),author) == $nick) { remini -n %ifbdir $+ \ $+ %ifbinfofile $3 | inc %ifbsetnumber 1 | msg $chan $iif(%ifbcustombotreply == enabled,$replace($readini(%ifbdir $+ \ $+ %ifbconfigfile,replys,deletion),<factoid>,$3-),I Forgot ' $+ $3- $+ ' $nick) | return }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($3-,$chr(32),$chr(95)),null) == true) { msg $chan Cannot Alter Null Factoids $nick | return }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($3-,$chr(32),$chr(95)),locked) == true) { msg $chan Cannot Alter Locked Factoids $nick | return }
else { remini -n %ifbdir $+ \ $+ %ifbinfofile $replace($3-,$chr(32),$chr(95)) | inc %ifbsetnumber 1 | msg $chan $iif(%ifbcustombotreply == enabled,$replace($readini(%ifbdir $+ \ $+ %ifbconfigfile,replys,deletion),<factoid>,$3-),I Forgot ' $+ $3- $+ ' $nick) | return }
}
}
alias -l ifbfactinfo {
if (%ifbfactinfo == enabled) {
if ($3 == $null) { msg $chan Please Include A Factoid | return }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($3-,$chr(32),$chr(95)),blocked) == true) { msg $chan Factoid ' $+ $3- $+ ' Is Blocked | return }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($3-,$chr(32),$chr(95)),null) == true) { msg $chan Factoid ' $+ $3- $+ ' Is Set As Null | return }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($3-,$chr(32),$chr(95)),name) != $null) { msg $chan Factoid ' $+ $3- $+ ' Was Created On $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($3-,$chr(32),$chr(95)),date) At $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($3-,$chr(32),$chr(95)),time) By $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($3-,$chr(32),$chr(95)),author) $+ . It Has Been Requested $iif($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($3-,$chr(32),$chr(95)),requested) != 1, $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($3-,$chr(32),$chr(95)),requested) Times, Once) $+ . }
else { msg $chan Factoid ' $+ $3- $+ ' Does Not Exist $nick }
}
}
alias -l ifbwantnick {
if ($ifbisadmin == $true) { nick $3 }
else { msg $chan I Am Not Allowed To Change Nickname $nick }
}
alias -l ifbaddons {
if ($ifbisadmin == $true) || ($ifbismaster(addons) == $true) {
if ($3 == list) {
var %ifbloadedaddons = 0, %ifbavailableaddons = 0
if ($exists(%ifbdir $+ \addons\loaded-addons.txt) == $true) {
var %ifbloadedaddons = $lines(%ifbdir $+ \addons\loaded-addons.txt), %ifbtotaladdons = $lines(%ifbdir $+ \addons\loaded-addons.txt), %ifbloadedaddonschecked = 0
while (%ifbloadedaddonschecked < %ifbloadedaddons) {
inc %ifbloadedaddonschecked 1
var %ifbloadedaddonsname = %ifbloadedaddonsname $read(%ifbdir $+ \addons\loaded-addons.txt,%ifbloadedaddonschecked) $+ $chr(44)
}
var %ifbloadedaddonsname = $left(%ifbloadedaddonsname,$calc($len(%ifbloadedaddonsname) - 1)) $+ $chr(46)
}
if ($exists(%ifbdir $+ \addons\available-addons.txt) == $true) {
var %ifbavailableaddons = $lines(%ifbdir $+ \addons\available-addons.txt), %ifbtotaladdons = $calc(%ifbtotaladdons + $lines(%ifbdir $+ \addons\available-addons.txt)), %ifbavailableaddonschecked = 0
while (%ifbavailableaddonschecked < %ifbavailableaddons) {
inc %ifbavailableaddonschecked 1
var %ifbavailableaddonsname = %ifbavailableaddonsname $read(%ifbdir $+ \addons\available-addons.txt,%ifbavailableaddonschecked) $+ $chr(44)
}
var %ifbavailableaddonsname = $left(%ifbavailableaddonsname,$calc($len(%ifbavailableaddonsname) - 1)) $+ $chr(46)
}
notice $nick There $iif(%ifbtotaladdons != 1,Are,Is) A Total of %ifbtotaladdons $iif(%ifbtotaladdons != 1,Addons,Addons) $+ $chr(58) %ifbloadedaddons $iif(%ifbloadedaddons != 1,Addons,Addon) $iif(%ifbloadedaddons != 1,Are,Is) $iif(%ifbloadedaddons > 0,Loaded; %ifbloadedaddonsname,Loaded $+ $chr(44)) And There Are There $iif(%ifbavailableaddons != 1,Are,Is) %ifbavailableaddons Available $iif(%ifbavailableaddons != 1,Addons; %ifbavailableaddonsname,Addons.)
return
}
if ($3 == install) {
if ($exists(%ifbdir $+ \addons\ $+ $4) == $true) { write %ifbdir $+ \addons\loaded-addons.txt $left($4,$calc($pos($4,$chr(46),$pos($4,$chr(46),0))-1)) | .load -rs %ifbdir $+ \addons\ $+ $4 | notice $nick $left($4,$calc($len($4) - 4)) Addon Successfully Installed | return }
else { notice $nick Error Installing Addon | return }
}
if ($3 == uninstall) {
if ($script($4) != $null) { write -dw $+ $left($4,$calc($pos($4,$chr(46),$pos($4,$chr(46),0))-1)) %ifbdir $+ \addons\loaded-addons.txt | .unload -rs %ifbdir $+ \addons\ $+ $4 | notice $nick $left($4,$calc($len($4) - 4)) Addon Successfully Uninstalled | return }
else { notice $nick Error Uninstalling Addon | return }
}
else { msg $chan Please Include Install/Uninstall/List | return }
}
else { msg $chan I Am Not Allowed To Use The Addon Function $nick | return }
}
alias -l ifbebackup {
if ($ifbisadmin == $true) {
if ($3 == settings) {
if ($4 == backup) {
if ($5 != $null) { set %ifbbackupfile $5 | msg $chan Settings Backed Up To ' $+ $5 $+ ' | ifbbackup settings true | return }
else { msg $chan Please Include A File To Backup To | return }
}
if ($4 == restore) {
if ($5 != $null) { set %ifbbackupfile $5 | ifbrestore $chan | return }
else { msg $chan Please Include A File To Restore From | return }
}
else { msg $chan Please Select Backup Or Restore | return }
}
if ($3 == factoids) {
if ($4 == backup) {
if ($5 != $null) { set %ifbbackup2file $5 | ifbbackup factoids true | msg $chan Factoids Backed Up To ' $+ $5 $+ ' }
else { msg $chan Please Include A File To Backup To | return }
}
if ($4 == restore) {
if ($5 != $null) { set %ifbbackup2file $5 | ifbrestorefactoids $chan | return }
else { msg $chan Please Include A File To Restore From | return }
}
else { msg $chan Please Select Backup Or Restore | return }
}
else { msg $chan Please Select Settings Or Factoids | return }
}
else { msg $chan I Am Not Allowed To Use The Backup Function $nick | return }
}
alias -l ifbcommands {
if ($ifbisadmin == $true) || ($ifbismaster(admin) == $true) {
if ($$3 == enable) {
if ($$4 == set) { set %ifbsetfactoid enabled | msg $chan Command Enabled | return }
if ($$4 == multi) { set %ifbmultifactoid enabled | msg $chan Command Enabled | return }
if ($$4 == lock) { set %ifblocked enabled | msg $chan Command Enabled | return }
if ($$4 == forget) { set %ifbforget enabled | msg $chan Command Enabled | return }
if ($$4 == factinfo) { set %ifbfactinfo enabled | msg $chan Command Enabled | return }
if ($$4 == encrypt) { set %ifbendecrypt enabled | msg $chan Command Enabled | return }
if ($$4 == decrypt) { set %ifbendecrypt enabled | msg $chan Command Enabled | return }
if ($$4 == factnum) { set %ifbfactnum enabled | msg $chan Command Enabled | return }
if ($$4 == stats) { set %ifbstats enabled | msg $chan Command Enabled | return }
if ($$4 == nickometer) { set %ifbnickometer enabled | msg $chan Command Enabled | return }
if ($$4 == karma) { set %ifbkarma enabled | msg $chan Command Enabled | return }
if ($$4 == calculate) { set %ifbcalculate enabled | msg $chan Command Enabled | return }
if ($$4 == date) { set %ifbdatetime enabled | msg $chan Command Enabled | return }
if ($$4 == time) { set %ifbdatetime enabled | msg $chan Command Enabled | return }
if ($$4 == datetime) { set %ifbdatetime enabled | msg $chan Command Enabled | return }
if ($$4 == dns) { set %ifbdnshost enabled | msg $chan Command Enabled | return }
if ($$4 == tell) { set %ifbtell enabled | msg $chan Command Enabled | return }
if ($$4 == help) { set %ifbhelp enabled | msg $chan Command Enabled | return }
if ($$4 == hacklog) { set %ifbhacklog enabled | msg $chan Command Enabled | return }
if ($$4 == botask) { set %ifbbotask enabled | msg $chan Command Enabled | return }
if ($$4 == customreply) { set %ifbcustombotreply enabled | msg $chan Command Enabled | return }
else { msg $chan Unknown Command To Enable | return }
}
if ($$3 == disable) {
if ($$4 == set) { unset %ifbsetfactoid | msg $chan Command Disabled | return }
if ($$4 == multi) { unset %ifbmultifactoid | msg $chan Command Disabled | return }
if ($$4 == lock) { unset %ifblocked | msg $chan Command Disabled | return }
if ($$4 == forget) { unset %ifbforget | msg $chan Command Disabled | return }
if ($$4 == factinfo) { unset %ifbfactinfo | msg $chan Command Disabled | return }
if ($$4 == encrypt) { unset %ifbendecrypt | msg $chan Command Disabled | return }
if ($$4 == decrypt) { unset %ifbendecrypt | msg $chan Command Disabled | return }
if ($$4 == factnum) { unset %ifbfactnum | msg $chan Command Disabled | return }
if ($$4 == stats) { unset %ifbstats | msg $chan Command Disabled | return }
if ($$4 == nickometer) { unset %ifbnickometer | msg $chan Command Disabled | return }
if ($$4 == karma) { unset %ifbkarma | msg $chan Command Disabled | return }
if ($$4 == calculate) { unset %ifbcalculate | msg $chan Command Disabled | return }
if ($$4 == date) { unset %ifbdatetime | msg $chan Command Disabled | return }
if ($$4 == time) { unset %ifbdatetime | msg $chan Command Disabled | return }
if ($$4 == datetime) { unset %ifbdatetime | msg $chan Command Disabled | return }
if ($$4 == dns) { unset %ifbdnshost | msg $chan Command Disabled | return }
if ($$4 == tell) { unset %ifbtell | msg $chan Command Disabled | return }
if ($$4 == help) { unset %ifbhelp | msg $chan Command Disabled | return }
if ($$4 == hacklog) { unset %ifbhacklog | msg $chan Command Disabled | return }
if ($$4 == botask) { unset %ifbbotask | msg $chan Command Disabled | return }
if ($$4 == customreply) { unset %ifbcustombotreply | msg $chan Command Disabled | return }
else { msg $chan Unknown Command To Disable }
}
if ($$3 == check) {
if ($$4 == set) { msg $chan Command $iif(%ifbsetfactoid != $null,Enabled,Disabled) | return }
if ($$4 == lock) { msg $chan Command $iif(%ifblocked != $null,Enabled,Disabled) | return }
if ($$4 == forget) { msg $chan Command $iif(%ifbforget != $null,Enabled,Disabled) | return }
if ($$4 == factinfo) { msg $chan Command $iif(%ifbfactinfo != $null,Enabled,Disabled) | return }
if ($$4 == encrypt) { msg $chan Command $iif(%ifbendecrypt != $null,Enabled,Disabled) | return }
if ($$4 == decrypt) { msg $chan Command $iif(%ifbendecrypt != $null,Enabled,Disabled) | return }
if ($$4 == factnum) { msg $chan Command $iif(%ifbfactnum != $null,Enabled,Disabled) | return }
if ($$4 == stats) { msg $chan Command $iif(%ifbstats != $null,Enabled,Disabled) | return }
if ($$4 == nickometer) { msg $chan Command $iif(%ifbnickometer != $null,Enabled,Disabled) | return }
if ($$4 == karma) { msg $chan Command $iif(%ifbkarma != $null,Enabled,Disabled) | return }
if ($$4 == calculate) { msg $chan Command $iif(%ifbcalculate != $null,Enabled,Disabled) | return }
if ($$4 == date) { msg $chan Command $iif(%ifbdatetime != $null,Enabled,Disabled) | return }
if ($$4 == time) { msg $chan Command $iif(%ifbdatetime != $null,Enabled,Disabled) | return }
if ($$4 == datetime) { msg $chan Command $iif(%ifbdatetime != $null,Enabled,Disabled) | return }
if ($$4 == dns) { msg $chan Command $iif(%ifbdnshost != $null,Enabled,Disabled) | return }
if ($$4 == tell) { msg $chan Command $iif(%ifbtell != $null,Enabled,Disabled) | return }
if ($$4 == help) { msg $chan Command $iif(%ifbhelp != $null,Enabled,Disabled) | return }
if ($$4 == hacklog) { msg $chan Command $iif(%ifbhacklog != $null,Enabled,Disabled) | return }
if ($$4 == botask) { msg $chan Command $iif(%ifbbotask != $null,Enabled,Disabled) | return }
if ($$4 == customreply) { msg $chan Command $iif(%ifbcustomreply != $null,Enabled,Disabled) | return }
else { msg $chan Unknown Command To Check | return }
}
else { msg $chan Please Include Enable/Disable/Check }
}
else { msg $chan I Am Not Allowed To Enable/Disable/Check Commands $nick }
}
alias -l ifbop {
if ($ifbisadmin == $true) || ($ifbismaster(chancommands) == $true) { mode $$3 +o $$4 }
else { msg $chan I Am Not Allowed To Op $nick }
}
alias -l ifbdeop {
if ($ifbisadmin == $true) || ($ifbismaster(chancommands) == $true) { mode $$3 -o $$4 }
else { msg $chan I Am Not Allowed To Deop $nick }
}
alias -l ifbvoice {
if ($ifbisadmin == $true) || ($ifbismaster(chancommands) == $true) { mode $$3 +v $$4 }
else { msg $chan I Am Not Allowed To Voice $nick }
}
alias -l ifbdevoice {
if ($ifbisadmin == $true) || ($ifbismaster(chancommands) == $true) { mode $$3 -v $$4 }
else { msg $chan I Am Not Allowed To Devoice $nick }
}
alias -l ifbhalfop {
if ($ifbisadmin == $true) || ($ifbismaster(chancommands) == $true) { mode $$3 +h $$4 }
else { msg $chan I Am Not Allowed To Halfop $nick }
}
alias -l ifbdehalfop {
if ($ifbisadmin == $true) || ($ifbismaster(chancommands) == $true) { mode $3 -h $4 }
else { msg $chan I Am Not Allowed To Dehalfop $nick }
}
alias -l ifbmode {
if ($ifbisadmin == $true) || ($ifbismaster(chancommands) == $true) { mode $3 $4 $5- }
else { msg $chan I Am Not Allowed To Set Modes $nick }
}
alias -l ifbjoin {
if ($ifbisadmin == $true) || ($ifbismaster(chancommands) == $true) { join $3 $4 }
else { msg $chan I Am Not Allowed To Join $3 $nick }
}
alias -l ifbpart {
if ($ifbisadmin == $true) || ($ifbismaster(chancommands) == $true) { part $3 $4- }
else { msg $chan I Am Not Allowed To Part $3 $nick }
}
alias -l ifbrejoin {
if ($ifbisadmin == $true) || ($ifbismaster(chancommands) == $true) {
if ($4 isnum) { part $chan | .timer 1 $4 .join $chan }
else { msg $chan Please Include A Time Period Until Rejoin | return }
}
else { msg $chan I Am Not Allowed To Join $3 $nick }
}
alias -l ifbkick {
if ($ifbisadmin == $true) || ($ifbismaster(chancommands) == $true) { kick $3 $4 $5- }
else { msg $chan I Am Not Allowed To Kick $nick }
}
alias -l ifbban {
if ($ifbisadmin == $true) || ($ifbismaster(chancommands) == $true) { mode $3 +b $4 }
else { msg $chan I Am Not Allowed To Ban $nick }
}
alias -l ifbunban {
if ($ifbisadmin == $true) || ($ifbismaster(chancommands) == $true) { mode $3 -b $4 }
else { msg $chan I Am Not Allowed To Unban $nick }
}
alias -l ifbsay {
if ($ifbisadmin == $true) || ($ifbismaster(chancommands) == $true) { msg $3 $4- }
else { msg $chan I Am Not Allowed To Say $nick }
}
alias -l ifbdescribe {
if ($ifbisadmin == $true) || ($ifbismaster(chancommands) == $true) { describe $3 $4- }
else { msg $chan I Am Not Allowed To Describe $nick }
}
alias -l ifbinvite {
if ($ifbisadmin == $true) || ($ifbismaster(chancommands) == $true) { invite $3 $4 }
else { msg $chan I Am Not Allowed To Invite $nick }
}
alias -l ifbquit {
if ($ifbisadmin == $true) || ($ifbismaster(quit) == $true) { quit $3- }
else { msg $chan I Am Not Allowed To Quit $nick }
}
alias -l ifbannounce {
if ($ifbisadmin == $true) || ($ifbismaster(chancommands) == $true) {
if ($3 != $null) { .scid -a .amsg $$3- }
else { msg $chan Please Include A Message To Use }
}
else { msg $chan I Am Not Allowed To Announce $nick }
}
alias -l ifbignore {
if ($ifbisadmin == $true) || ($ifbismaster(ignore) == $true) {
if ($$3 == $null) { msg $chan Please Include A Host To Ignore | return }
if ($$3 == exclude) {
if ($$4 == $null) { msg $chan Please Include A Host To Exclude | return }
.ignore -x $4 | msg $chan $4 Has Been Excluded From Ignore | return
}
if ($$3 == unexclude) {
if ($$4 == $null) { msg $chan Please Include A Host To Unexclude | return }
.ignore -r $4 | msg $chan $4 Has Been Excluded From Ignore | return
}
if ($$3 == clear) {
.ignore -r | msg $chan Ignore List Has Been Cleared | return
}
.ignore -pcnikd $3 | msg $chan $3 has been Ignored | return
}
else { msg $chan I Am Not Allowed To Ignore $nick }
}
alias -l ifbunignore {
if ($ifbisadmin == $true) || ($ifbismaster(ignore) == $true) { .ignore -r $3 | msg $chan $3 has been Unignored }
else { msg $chan I Am Not Allowed To Unignore $nick }
}
alias -l ifbforgetall {
if ($ifbisadmin == $true) || ($ifbismaster(overrule) == $true) { write -c %ifbdir $+ \ $+ %ifbinfofile | msg $chan Factoids Cleared $nick | set %ifbsetnumber 0 }
else { msg $chan I Am Not Allowed To Forget All $Nick }
}
alias -l ifbclearfactoids {
if ($ifbisadmin == $true) || ($ifbismaster(overrule) == $true) { write -c %ifbdir $+ \ $+ %ifbinfofile | msg $chan Factoids Cleared $nick | set %ifbsetnumber 0 }
else { msg $chan I Am Not Allowed To Clear $nick }
}
alias -l ifbfactnum {
if (%ifbfactnum == enabled) {
if ($3 == synchronise) {
if ($ifbisadmin == $true) || (override isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$nick)) { set %ifbsetnumber $ini(%ifbdir $+ \ $+ %ifbinfofile,0) | msg $chan Factoid Number Synchronised | return }
else { msg $chan I Am Not Allowed To Synchronise Factoid Number $nick | return }
}
if ($3 == set) {
if ($4 isnum) {
if ($ifbisadmin == $true) || ($ifbismaster(overrule) == $true) { set %ifbsetnumber $4 | msg $chan Factoid Number Set To ' $+ $4 $+ ' | return }
else { msg $chan I Am Not Allowed To Set Factoid Number $nick | return }
}
else { msg %chan Please Include A Number To Set Factoid Number To }
}
msg $chan There $iif(%ifbsetnumber != 1, Are, Is) %ifbsetnumber $iif(%ifbsetnumber != 1, Factoids, Factoid) In My Database
}
else { return }
}
;Vital for making sure some Factoids can't be used
alias -l ifbforbidden {
msg $chan Command/Factoid Forbidden $nick
}
alias -l ifbforbid {
if ($ifbisadmin == $true) || ($ifbismaster(forbid) == $true) {
if ($3 == add) {
if ($4 != $null) {
if ($readini(%ifbdir $+ \ $+ %ifbconfigfile,forbid,$4) != $null) { msg $chan I Already Have ' $+ $4 $+ ' In The Forbidden List $nick }
else { writeini -n %ifbdir $+ \ $+ %ifbconfigfile forbid $4 enabled | msg $chan Added ' $+ $4 $+ ' To Forbidden List $nick }
}
else { msg $chan Please Include A Word/Wildcarded Word To Forbid }
}
elseif ($3 == del) {
if ($4 != $null) {
if ($readini(%ifbdir $+ \ $+ %ifbconfigfile,forbid,$4) != $null) { remini %ifbdir $+ \ $+ %ifbconfigfile forbid $4 | msg $chan Removed ' $+ $4 $+ ' From Forbidden List $nick }
else { msg $chan Sorry ' $+ $4 $+ ' Is Not In Forbidden List $nick }
}
else { msg $chan Please Include A Word/Wildcarded Word To Unforbid }
}
elseif ($3 == exception) {
if ($4 == add) {
if ($5 != $null) {
if ($readini(%ifbdir $+ \ $+ %ifbconfigfile,forbid,$5) != $null) { msg $chan I Already Have ' $+ $5 $+ ' In The Forbid Exception List $nick }
else { writeini -n %ifbdir $+ \ $+ %ifbconfigfile forbid-except $5 enabled | msg $chan Added ' $+ $5 $+ ' To Forbid Exception List $nick }
}
else { msg $chan Please Include A Word/Wildcarded Word To Except From The Forbidden List }
}
elseif ($4 == del) {
if ($5 != $null) {
if ($readini(%ifbdir $+ \ $+ %ifbconfigfile,forbid-except,$5) != $null) { remini %ifbdir $+ \ $+ %ifbconfigfile forbid-except $5 | msg $chan Removed ' $+ $5 $+ ' From Forbidden Exception List $nick }
else { msg $chan Sorry ' $+ $5 $+ ' Is Not In Forbidden Exception List $nick }
}
else { msg $chan Please Include A Word/Wildcarded Word To Remove From The Forbidden Exception List }
}
else { msg $chan Please Include Add/Del | return }
}
else { msg $chan Please Include Add/Del/Exception | return }
}
else { msg $chan I Am Not Allowed To Forbid/Unforbid $nick }
}
alias -l ifbblock {
if ($ifbisadmin == $true) || ($ifbismaster(forbid) == $true) { remini -n %ifbdir $+ \ $+ %ifbinfofile $replace($3-,$chr(32),$chr(95)) | writeini -n %ifbdir $+ \ $+ %ifbinfofile $replace($3-,$chr(32),$chr(95)) blocked true | msg $chan Factoid Blocked $nick }
else { msg $chan I Am Not Allowed To Block ' $+ $replace($3-,$chr(95),$chr(32)) $+ ' $nick }
}
alias -l ifbunblock {
if ($ifbisadmin == $true) || ($ifbismaster(forbid) == $true) {
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($3-,$chr(32),$chr(95)),blocked) == true) { remini -n %ifbdir $+ \ $+ %ifbinfofile $replace($3-,$chr(32),$chr(95)) | msg $chan Factoid Unblocked $nick }
else { msg $chan Sorry ' $+ $replace($3-,$chr(32),$chr(95)) $+ ' Is Not Blocked $nick }
}
else { msg $chan I Am Not Allowed To Unblock ' $+ $replace($3-,$chr(95),$chr(32)) $+ ' $nick }
}
;Remote update checker
alias -l ifbupdatecheck {
if ($ifbisadmin == $true) || ($ifbismaster(admin) == $true) {
set %ifbremotecheck true
set %ifbremotechan $chan
.sockopen ifbupdate infobloot.icenetwork.co.uk 80
}
else { msg $chan I Am Not Allowed To Check For Updates $nick }
}
;Statistical information
alias -l ifbstats {
if (%ifbstats == enabled) {
if ($3 == requested) || ($3 == requested,) { goto ifbstatsbegin }
else { msg $chan Please Include Requested | return }
:ifbstatsbegin
if ($4 == $null) { msg $chan Please Include A Factoid $nick | return }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($4-,$chr(32),$chr(95)),name) == $null) { msg $chan Factiod ' $+ $4- $+ ' Does Not Exist $nick }
else { msg $chan ' $+ $4- $+ ' Has Been Requested $iif($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($4-,$chr(32),$chr(95)),requested) != 1, $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($4-,$chr(32),$chr(95)),requested) Times, Once) $+ . }
}
else { return }
}
;gives version information
alias -l ifbversion {
msg $chan I Am Running InfoBloot Version %ifbversion By IceShaman
}
;This is my prided nickometer...Oooooh the effort...
;recoded for 1.04 <RC2>
alias -l ifbnickometer {
if (%ifbnickometer == enabled) {
var %name = $3, %length = $len($3), %isupper = 0, %isnum = 0, %islame = 0, %isvowel = 0, %vowels = aeiou, %punish = 0
elseif (%length > 10) { var %length = 6 | inc %punish $calc(%length / 10) }
if ($len($3) > 10) { inc %punish $calc($len($3) - 10) }
if ($right(%name,1) isnum) { inc %punish $iif(%length == 1,0.2,$calc(2 / %length)) }
if ($right(%name,1) !isalnum) { inc %punish $iif(%length == 1,0.2,$calc(2 / %length)) }
if ($right(%name,1) isupper) { inc %punish $iif(%length == 1,0.2,$calc(2 / %length)) }
if ($left(%name,1) isnum) { inc %punish $iif(%length == 1,0.2,$calc(2 / %length)) }
if ($left(%name,1) !isalnum) { inc %punish $iif(%length == 1,0.2,$calc(2 / %length)) }
if ($right(%name,2) isnum) { inc %punish $iif(%length == 1,0,$calc(3 / %length)) }
while (%name) {
if (%length > 3) {
var %character = $left(%name,1)
if (%character !isalnum) { inc %punish $calc(0.06 * %length) | inc %islame }
if (%character isupper) { inc %isupper }
if (%character isnum) { inc %isnum }
if (%character isin %vowels) { inc %isvowel 1) }
if ($count($3,%character) == $len($3)) { inc %punish $calc(0.02 * %length) }
elseif (($count($3,%character) > $round($calc($len($3) / 4))) && (%length > 5)) { inc %punish $calc(3 / %length) }
}
var %name = $right(%name,-1)
}
if (%isupper > 4) || ((%isupper >= $round($calc($len($3) / 4)),0) && ($len($3) > 2)) { inc %punish $calc((%isupper * 2) / %length) }
if (%isnum > 4) || (%isnum >= $round($calc($len($3) / 2)),0) { inc %punish $calc(3 / %length) }
if (%isvowel > 4) || (%isvowel > $round($calc($len($3) / 2)),0) { inc %punish $calc(2 / %length) }
if (%islame > 4) || (%islame > $round($calc($len($3) / 2)),0) { inc %punish $calc(%islame / %length) }
var %percentage = $round($calc((%punish / %length) * 100),5)
if (%percentage > 100) { msg $chan $3 is off the lame scale $nick }
else { msg $chan $3 is %percentage $+ % lame }
}
}
;This is the karma (factoid rating system) section
alias -l ifbkarma {
if (%ifbkarma == enabled) {
if ($4 == $null) { msg $chan Invalid Statement | return }
if (%ifbmultinum == $null) {
if (++ isin $1-) { set %ifbmultinum $calc($findtok($1-,++,1,32) - 1) }
elseif (-- isin $1-) { set %ifbmultinum $calc($findtok($1-,--,1,32) - 1) }
else { set %ifbmultinum $0 }
}
if ($3 == for) { var %ifbmn = $replace($gettok($1-,4- $+ %ifbmultinum,32),$chr(32),$chr(95)) }
else { var %ifbmn = $replace($gettok($1-,3- $+ %ifbmultinum,32),$chr(32),$chr(95)) }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,name) != $null) { goto kfe }
else { msg $chan Factoid Does Not Exist | return }
;karma factoid exists
;also known as the the karma++ section
:kfe
if ($findtok($2-7,++,1,32) != $null) {
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karmalocked) != true) { ifbkarma+++ %ifbmn | return }
else { msg $chan Cannot Alter Locked Karma $nick | return }
}
if ($findtok($2-7,--,1,32) != $null) {
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karmalocked) != true) { ifbkarma--- %ifbmn | return }
else { msg $chan Cannot Alter Locked Karma $nick | return }
}
else { goto calckarma }
;displays karma
:calckarma
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,name) == $null) { msg $chan Factoid ' $+ %ifbmn $+ ' Does Not Exist }
else {
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karma) <= 2) { msg $chan Karma Rating: %ifbkarmaword1 ( $+ $readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karma) $+ /10 $+ ) }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karma) == 3) { msg $chan Karma Rating: %ifbkarmaword2 ( $+ $readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karma) $+ /10 $+ ) }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karma) == 4) { msg $chan Karma Rating: %ifbkarmaword2 ( $+ $readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karma) $+ /10 $+ ) }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karma) == 5) { msg $chan Karma Rating: %ifbkarmaword3 ( $+ $readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karma) $+ /10 $+ ) }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karma) == 6) { msg $chan Karma Rating: %ifbkarmaword4 ( $+ $readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karma) $+ /10 $+ ) }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karma) == 7) { msg $chan Karma Rating: %ifbkarmaword4 ( $+ $readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karma) $+ /10 $+ ) }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karma) == 8) { msg $chan Karma Rating: %ifbkarmaword4 ( $+ $readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karma) $+ /10 $+ ) }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karma) >= 9) { msg $chan Karma Rating: %ifbkarmaword5 ( $+ $readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karma) $+ /10 $+ ) }
unset %ifbmultinum
}
}
else { return }
}
alias -l ifblockkarma {
if (%ifbkarma == enabled) {
if ($3 == $null) { msg $chan Please Include A Factoid To Karma Lock | return }
if ($ifbisadmin == $true) || ($ifbismaster(overrule) == $true) { goto checkkfle }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($3-,$chr(32),$chr(95)),author) == $nick) { goto checkkfle }
else { msg $chan I Am Not Allowed To Lock Karma $nick | return }
;kfle (karma factoid lock exist) i.e does the file your about to lock exist
:checkkfle
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($3-,$chr(32),$chr(95)),name) == $null) { msg $chan Factoid ' $+ $3- $+ ' Does Not Exist $nick | return }
else { writeini -n %ifbdir $+ \ $+ %ifbinfofile $replace($3-,$chr(32),$chr(95)) karmalocked true | msg $chan ' $+ $3- $+ ' Karma Locked $nick | return }
}
else { return }
}
alias -l ifbunlockkarma {
if (%ifbkarma == enabled) {
if ($3 == $null) { msg $chan Please Include A Factoid To Karma Lock | return }
if ($ifbisadmin == $true) || ($ifbismaster(overrule) == $true) { goto checkkfue }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($3-,$chr(32),$chr(95)),author) == $nick) { goto checkkfue }
else { msg $chan I Am Not Allowed To Unlock Karma $nick | return }
;kfue (karma factoid unlock exist) i.e does the file your about to unlock exist
:checkkfue
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($3-,$chr(32),$chr(95)),name) == $null) { msg $chan Factoid ' $+ $3- $+ ' Does Not Exist $nick }
else { writeini -n %ifbdir $+ \ $+ %ifbinfofile $replace($3-,$chr(32),$chr(95)) karmalocked false | msg $chan ' $+ $3- $+ ' Karma Unlocked $nick }
}
else { return }
}
alias -l ifbkarma++ {
if (%ifbkarma == enabled) {
var %ifbmn = $replace($gettok($1-,2- $+ %ifbmultinum,32),$chr(32),$chr(95),++,$null)
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karmalocked) == false) {
if (($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karma) < 10) && ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karma) > 0)) {
var %ifbkarmacurrent = $readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karma)
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,author) == $nick) { msg $chan You Cannot Change Your Own Karma $nick | unset %ifbmultinum | return }
else { writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn karma $calc(%ifbkarmacurrent + %ifbkarmanum) | msg $chan Karma Updated $nick | unset %ifbmultinum }
}
else { msg $chan Karma Updated $nick | unset %ifbmultinum | return }
}
else { msg $chan Cannot Alter Locked Karma $nick | unset %ifbmultinum | return }
}
else { return }
}
alias -l ifbkarma-- {
if (%ifbkarma == enabled) {
var %ifbmn = $replace($gettok($1-,2- $+ %ifbmultinum,32),$chr(32),$chr(95),--,$null)
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karmalocked) == false) {
if (($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karma) < 10) && ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karma) > 0)) {
var %ifbkarmacurrent = $readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karma)
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,author) == $nick) { msg $chan You Cannot Change Your Own Karma $nick | return | unset %ifbmultinum }
else { writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn karma $calc(%ifbkarmacurrent - %ifbkarmanum) | msg $chan Karma Updated $nick | unset %ifbmultinum }
}
else { msg $chan Karma Updated $nick | unset %ifbmultinum | return }
}
else { msg $chan Cannot Alter Locked Karma $nick | unset %ifbmultinum | return }
}
else { return }
}
alias -l ifbkarma+++ {
if (%ifbkarma == enabled) {
if (($readini(%ifbdir $+ \ $+ %ifbinfofile,$1-,karma) < 10) && ($readini(%ifbdir $+ \ $+ %ifbinfofile,$1-,karma) > 0)) {
var %ifbkarmacurrent = $readini(%ifbdir $+ \ $+ %ifbinfofile,$1-,karma)
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$1-,author) == $nick) { msg $chan You Cannot Change Your Own Karma $nick | unset %ifbmultinum | return }
else { writeini -n %ifbdir $+ \ $+ %ifbinfofile $1- karma $calc(%ifbkarmacurrent + %ifbkarmanum) | msg $chan Karma Updated $nick | unset %ifbmultinum }
}
else { msg $chan Karma Updated $nick | unset %ifbmultinum | return }
}
else { return }
}
alias -l ifbkarma--- {
if (%ifbkarma == enabled) {
if (($readini(%ifbdir $+ \ $+ %ifbinfofile,$1-,karma) < 10) && ($readini(%ifbdir $+ \ $+ %ifbinfofile,$1-,karma) > 0)) {
var %ifbkarmacurrent = $readini(%ifbdir $+ \ $+ %ifbinfofile,$1-,karma)
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$1-,author) == $nick) { msg $chan You Cannot Change Your Own Karma $nick | unset %ifbmultinum | return }
else { writeini -n %ifbdir $+ \ $+ %ifbinfofile $1- karma $calc(%ifbkarmacurrent - %ifbkarmanum) | msg $chan Karma Updated $nick | unset %ifbmultinum }
}
else { msg $chan Karma Updated $nick | unset %ifbmultinum | return }
}
else { return }
}
alias -l ifbkarmaset {
if (%ifbkarma == enabled) {
if ($ifbisadmin == $true) || ($ifbismaster(overrule) == $true) {
var %ifbmn = $replace($gettok($1-,3- $+ %ifbmultinum,32),$chr(32),$chr(95))
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,karma) == $null) { msg $chan Factoid Does Not Exist $nick | unset %ifbmultinum | return }
if ($gettok($1-,$calc(%ifbmultinum + 1),32) isnum) { writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn karma $gettok($1-,$calc(%ifbmultinum + 1),32) | msg $chan ' $+ $replace(%ifbmn,$chr(95),$chr(32)) $+ ' Karma Set To $gettok($1-,$calc(%ifbmultinum + 1),32) | unset %ifbmultinum | return }
else { msg $chan Please Include A Number To Set Karma To | unset %ifbmultinum }
}
else { msg $chan I Am Not Allowed To Set Karma $nick | unset %ifbmultinum }
}
else { unset %ifbmultinum | return }
}
alias -l ifblobotomy {
if ($ifbisadmin == $true) || ($ifbismaster(ignore) == $true) { set %ifblobotomy enabled | msg $chan Lobotomy Activated }
else { msg $chan I Am Not Allowed To Lobotomy $nick }
}
alias -l ifbunlobotomy {
if ($ifbisadmin == $true) || ($ifbismaster(ignore) == $true) { unset %ifblobotomy | msg $chan Lobotomy Deactivated }
else { msg $chan I Am Not Allowed To Unlobotomy $nick }
}
alias -l ifbalso {
if ($findtok($1-,%ifbfactoidtype,1,32) != 3) {
if (%ifbmultifactoid != enabled) { msg $chan Please Include A Delimeter And A Factoid | return }
else {
var %ifbmn = $replace($gettok($1-,2- $+ %ifbmultinum,32),$chr(32),$chr(95))
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,name) == $null) { msg $chan Factoid ' $+ $replace(%ifbmn,$chr(95),$chr(32)) $+ ' Does Not Exist $nick | return }
set %ifbalsofactoid $readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,factoid)
if ($ifbisadmin == $true) || ($ifbismaster(overrule) == $true) { writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn factoid %ifbalsofactoid and $gettok($1-,$calc(%ifbmultinum + 2) $+ -,32) | msg $chan Factoid Edited $nick | unset %ifbalsofactoid | unset %ifbmultinum | return }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,author) == $nick) { writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn factoid %ifbalsofactoid and $gettok($1-,$calc(%ifbmultinum + 2) $+ -,32) | msg $chan Factoid Edited $nick | unset %ifbalsofactoid | unset %ifbmultinum | return }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,locked) == true) { msg $chan Cannot Alter Locked Factoids $nick }
else { msg $chan Cannot Alter Locked Factoids $nick }
}
}
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$2,name) == $null) { msg $chan Factoid ' $+ $2 $+ ' Does Not Exist $nick | return }
set %ifbalsofactoid $readini(%ifbdir $+ \ $+ %ifbinfofile,$2,factoid)
if ($ifbisadmin == $true) || ($ifbismaster(overrule) == $true) { writeini -n %ifbdir $+ \ $+ %ifbinfofile $2 factoid %ifbalsofactoid and $4- | msg $chan Factoid Edited $nick | unset %ifbalsofactoid | return }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$2,author) == $nick) { writeini -n %ifbdir $+ \ $+ %ifbinfofile $2 factoid %ifbalsofactoid and $4- | msg $chan Factoid Edited $nick | unset %ifbalsofactoid | return }
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,$2,locked) == true) { msg $chan Cannot Alter Locked Factoids $nick }
else { msg $chan Cannot Alter Locked Factoids $nick }
}
alias -l ifbtell {
if (%ifbtell == enabled) {
if ($4 != about) { msg $chan Please Include The About Identifier | return }
if ($findtok($readini(%ifbdir $+ \ $+ %ifbconfigfile,settings,tellblock),$3,32) > 0) { msg $chan I Am Not Allowed To Tell ' $+ $3 $+ ' $nick | return }
elseif (($6 != $null) && (%ifbmultifactoid != enabled)) { msg $chan Factoid ' $+ $5- $+ ' Does Not Exist $nick | return }
var %ifbmn = $replace($5-,$chr(32),$chr(95))
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,name) != $null) {
if ($chr(124) isin $readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($5-,$chr(32),$chr(95)),factoid)) {
if ((($3 != $null) || ($chr(95) isin $5-)) && (%ifbmultifactoid != enabled)) { msg $chan Unknown Factoid/Command | return }
var %ifbreadfactoidline = $readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($5-,$chr(32),$chr(95)),factoid)
var %ifbfactoidlinepicked = $rand(1,$calc($count(%ifbreadfactoidline,$chr(124)) + 1))
if (%ifbfactoidlinepicked <= $count(%ifbreadfactoidline,$chr(124))) { var %ifbsayfactoidline = $left($left(%ifbreadfactoidline,$pos(%ifbreadfactoidline,$chr(124),%ifbfactoidlinepicked)),-1) }
else { var %ifbsayfactoidline = %ifbreadfactoidline }
if ($chr(124) isin %ifbsayfactoidline) { var %ifbsayfactoidline = $eval($remove($right($right(%ifbsayfactoidline,-3),- $+ $pos($right(%ifbsayfactoidline,-3),$chr(124),$pos($right(%ifbsayfactoidline,-3),$chr(124),0))),$chr(124)),2) }
if (%ifbfactoidlinepicked == 1) {
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($5-,$chr(32),$chr(95)),reply) == true) { msg $3 $nick wants you to know: %ifbsayfactoidline | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,requested) + 1) | msg $chan told $strip($3) about ' $+ $strip($5-) $+ ' $nick | return }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($5-,$chr(32),$chr(95)),action) == true) { describe $3 %ifbsayfactoidline | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,requested) + 1) | msg $chan told $strip($3) about ' $+ $strip($5-) $+ ' $nick | return }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($5-,$chr(32),$chr(95)),alias) == true) {
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace(%ifbsayfactoidline,$chr(32),$chr(95)),name),$chr(32),$chr(95)),name) == $null) { msg $chan Unknown Factoid/Command }
elseif ($chr(124) isin $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),factoid),$chr(32),$chr(95)),factoid)) { msg $chan Unknown Factoid/Command }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace(%ifbsayfactoidline,$chr(32),$chr(95)),name),$chr(32),$chr(95)),reply) == true) { .msg $3 $nick wants you to know: $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace(%ifbsayfactoidline,$chr(32),$chr(95)),name),$chr(32),$chr(95)),factoid) | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,requested) + 1) | msg $chan told $strip($3) about ' $+ $strip($5-) $+ ' $nick | return }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace(%ifbsayfactoidline,$chr(32),$chr(95)),name),$chr(32),$chr(95)),action) == true) { .describe $3 $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace(%ifbsayfactoidline,$chr(32),$chr(95)),name),$chr(32),$chr(95)),factoid) | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,requested) + 1) | msg $chan told $strip($3) about ' $+ $strip($5-) $+ ' $nick | return }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace(%ifbsayfactoidline,$chr(32),$chr(95)),name),$chr(32),$chr(95)),alias) == true) { msg $chan Unknown Factoid/Command }
else { .msg $3 $iif(%ifbcustombotreply == enabled,$readini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$rand(1,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,0)))),Factoid:) $readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($5-,$chr(32),$chr(95)),name) $readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($5-,$chr(32),$chr(95)),type) $readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,$replace(%ifbsayfactoidline,$chr(32),$chr(95)),name),$chr(32),$chr(95)),factoid) | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,requested) + 1) | msg $chan told $strip($3) about ' $+ $strip($5-) $+ ' $nick | return }
}
else { .msg $3 $iif(%ifbcustombotreply == enabled,$readini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$rand(1,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,0)))),Factoid:) $replace($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($5-,$chr(32),$chr(95)),name),$chr(95),$chr(32)) $readini(%ifbdir $+ \ $+ %ifbinfofile,$replace($2-,$chr(32),$chr(95)),type) %ifbsayfactoidline | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,requested) + 1) | msg $chan told $strip($3) about ' $+ $strip($5-) $+ ' $nick | return }
}
else {
if ($gettok(%ifbsayfactoidline,1,32) == <reply>) { .msg $3 $nick wants you to know: $gettok(%ifbsayfactoidline,2-,32) | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,requested) + 1) | msg $chan told $strip($3) about ' $+ $strip($5-) $+ ' $nick | return }
elseif ($left(%ifbsayfactoidline,7) == <reply>) { .msg $3 $nick wants you to know: $right(%ifbsayfactoidline,-7) | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,requested) + 1) | msg $chan told $strip($3) about ' $+ $strip($5-) $+ ' $nick | return }
elseif ($gettok(%ifbsayfactoidline,1,32) == <action>) { .describe $3 $gettok(%ifbsayfactoidline,2-,32) | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,requested) + 1) | msg $chan told $strip($3) about ' $+ $strip($5-) $+ ' $nick | return }
elseif ($left(%ifbsayfactoidline,8) == <action>) { .describe $3 $right(%ifbsayfactoidline,-8) | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,requested) + 1) | msg $chan told $strip($3) about ' $+ $strip($5-) $+ ' $nick | return }
elseif ($gettok(%ifbsayfactoidline,1,32) == <alias>) || ($left(%ifbsayfactoidline,7) == <alias>) {
var %ifbsayfactoidline = $iif($gettok(%ifbsayfactoidline,1,32) == <alias>,$gettok(%ifbsayfactoidline,2,32),$right(%ifbsayfactoidline,-7))
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,%ifbsayfactoidline,name) == $null) { msg $chan Unknown Factoid/Command }
elseif ($chr(124) isin $readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbsayfactoidline,factoid)) { msg $chan Unknown Factoid/Command }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,%ifbsayfactoidline,reply) == true) { .msg $3 $nick wants you to know: $readini(%ifbdir $+ \ $+ %ifbinfofile,n,%ifbsayfactoidline,factoid) | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbsayfactoidline requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbsayfactoidline,requested) + 1) | msg $chan told $strip($3) about ' $+ $strip($5-) $+ ' $nick | return }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,%ifbsayfactoidline,action) == true) { .describe $3 $readini(%ifbdir $+ \ $+ %ifbinfofile,n,%ifbsayfactoidline,factoid) | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbsayfactoidline requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbsayfactoidline,requested) + 1) | msg $chan told $strip($3) about ' $+ $strip($5-) $+ ' $nick | return }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,%ifbsayfactoidline,alias) == true) { msg $chan Unknown Factoid/Command }
else { .msg $3 $iif(%ifbcustombotreply == enabled,$readini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$rand(1,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,0)))),Factoid:) $replace($readini(%ifbdir $+ \ $+ %ifbinfofile,n,%ifbmn,name),$chr(95),$chr(32)) $readini(%ifbdir $+ \ $+ %ifbinfofile,n,%ifbsayfactoidline,type) $readini(%ifbdir $+ \ $+ %ifbinfofile,n,%ifbsayfactoidline,factoid) | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbsayfactoidline requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbsayfactoidline,requested) + 1) | msg $chan told $strip($3) about ' $+ $strip($5-) $+ ' $nick | return }
}
else { .msg $3 $iif(%ifbcustombotreply == enabled,$readini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$rand(1,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,0)))),Factoid:) $strip($5-) $readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,type) %ifbsayfactoidline | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbsayfactoidline requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbsayfactoidline,requested) + 1) | msg $chan told $strip($3) about ' $+ $strip($5-) $+ ' $nick | return }
}
}
else {
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,reply) == true) { .msg $3 $nick wants you to know: $readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,factoid) | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,requested) + 1) | msg $chan told $strip($3) about ' $+ $strip($5-) $+ ' $nick | return }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,action) == true) { .describe $3 $readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,factoid) | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,requested) + 1) | msg $chan told $strip($3) about ' $+ $strip($5-) $+ ' $nick | return }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,alias) == true) {
if ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,factoid),$chr(32),$chr(95)),name) == $null) { msg $chan Unknown Factoid/Command }
elseif ($chr(124) isin $readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,factoid),$chr(32),$chr(95)),factoid)) { msg $chan Unknown Factoid/Command }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,factoid),$chr(32),$chr(95)),reply) == true) { .msg $3 $nick wants you to know: $readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,factoid),$chr(32),$chr(95)),factoid) | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,requested) + 1) | msg $chan told $strip($3) about ' $+ $strip($5-) $+ ' $nick | return }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,factoid),$chr(32),$chr(95)),action) == true) { .describe $3 $readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,factoid),$chr(32),$chr(95)),factoid) | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,requested) + 1) | msg $chan told $strip($3) about ' $+ $strip($5-) $+ ' $nick | return }
elseif ($readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,factoid),$chr(32),$chr(95)),alias) == true) { msg $chan Unknown Factoid/Command }
else { .msg $3 $iif(%ifbcustombotreply == enabled,$readini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$rand(1,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,0)))),Factoid:) $readini(%ifbdir $+ \ $+ %ifbinfofile,n,%ifbmn,name) $readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,type) $readini(%ifbdir $+ \ $+ %ifbinfofile,n,$replace($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,factoid),$chr(32),$chr(95)),factoid) | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,requested) + 1) | msg $chan told $strip($3) about ' $+ $strip($5-) $+ ' $nick | return }
}
else { .msg $3 $iif(%ifbcustombotreply == enabled,$readini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$rand(1,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,0)))),Factoid:) $replace(%ifbmn,$chr(95),$chr(32)) $readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,type) $readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,factoid) | writeini -n %ifbdir $+ \ $+ %ifbinfofile %ifbmn requested $calc($readini(%ifbdir $+ \ $+ %ifbinfofile,%ifbmn,requested) + 1) | msg $chan told $strip($3) about ' $+ $strip($5-) $+ ' $nick }
}
}
else { msg $chan Factoid ' $+ $strip($5-) $+ ' Does Not Exist $nick }
}
}
alias -l ifbstatus {
if (%ifbstatus == enabled) {
msg $chan In My Database There $iif(%ifbsetnumber != 1, Are, Is) %ifbsetnumber $iif(%ifbsetnumber != 1, Factoids, Factoid). I Have Been Awake For $uptime(mirc,1) $+ . My Admin Is $iif(%ifbmasteradmin != $null,%ifbmasteradmin,<Nobody>) And My $iif($ini(%ifbdir $+ \ $+ %ifbconfigfile,masters,0) > 1, Masters, Master) $iif($ini(%ifbdir $+ \ $+ %ifbconfigfile,masters,0) > 1, Are, Is) $+ ; $iif($ini(%ifbdir $+ \ $+ %ifbconfigfile,masters,0) == 0, <Nobody>, $ifbmasters) $+ .
}
else { return }
}
alias -l ifbmasters {
var %ifbmasternum = $ini(%ifbdir $+ \ $+ %ifbconfigfile,masters,0), %ifbmasternumber = 1, %ifbmasterdone = 0
while (%ifbmasterdone < %ifbmasternum) {
var %ifbmasters = %ifbmasters $+ , $ini(%ifbdir $+ \ $+ %ifbconfigfile,masters,%ifbmasternumber)
inc %ifbmasternumber 1
inc %ifbmasterdone 1
}
return $right(%ifbmasters,$calc($len(%ifbmasters)-1))
}
alias -l ifbencrypt {
if (%ifbendecrypt == enabled) {
if ($3 == leet) || ($3 == leet,) { ifbleet $1- | return }
if ($3 == rot13) || ($3 == rot13,) { ifbrot13 $1- | return }
if ($3 == lame) || ($3 == lame,) { ifblame $1- | return }
if ($3 == shift) || ($3 == shift,) { ifbshift $1- | return }
if ($3 == backwards) || ($3 == backwards,) { ifbbackwards $1- | return }
if ($3 == md5) || ($3 == md5,) { ifbmd5 $1- | return }
if ($3 == $null) { msg $chan Nothing To Encrypt | return }
else { msg $chan Please Include Leet/Rot13/Lame/Shift/Backwards/MD5 | return }
}
else { return }
}
alias -l ifbdecrypt {
if (%ifbendecrypt == enabled) {
if ($3 == leet) || ($3 == leet,) { ifbunleet $1- | return }
if ($3 == rot13) || if ($3 == rot13,) { ifbrot13 $1- | return }
if ($3 == lame) || if ($3 == lame,) { ifbunlame $1- | return }
if ($3 == shift) || ($3 == shift,) { ifbshift $1- | return }
if ($3 == backwards) || ($3 == backwards,) { ifbbackwards $1- | return }
if ($3 == md5) || ($3 == md5,) { msg $chan MD5 Cannot be Decrypted $nick | return }
if ($3 == $null) { msg $chan Nothing To Decrypt | return }
else { msg $chan Please Include Leet/Rot13/Lame/Shift/Backwards | return }
}
else { return }
}
alias -l ifbleet {
msg $chan $replace($4-,a,@,A,@,c,<,C,<,e,3,E,3,h,|-|,H,|-|,i,|,I,|,l,1,l,1,m,|\/|,M,|\/|,o,0,O,0,t,7,T,7,v,\/,V,\/,w,\/\/,W,\/\/,z,2,Z,2)
}
alias -l ifbunleet {
msg $chan $replace($4-,@,a,<,c,3,e,|-|,h,1,l,|,i,|\/|,m,\/\/,w,\/,v,0,o,7,t,2,z)
}
;updated rot13
alias -l ifbrot13 {
if ($4 == $null) { msg $chan Please Set Word(s) To Encrypt/Decrypt. | return }
var %sentence = $4-
while (%sentence) {
if ($left(%sentence,1) !isalpha) { var %saysentence = %saysentence $+ $replace($left(%sentence,1),$chr(32),$chr(160)) }
elseif ($isupper($left(%sentence,1))) { var %saysentence = %saysentence $+ $chr($calc(($asc($left(%sentence,1)) - 52) % 26 + 65)) }
else { var %saysentence = %saysentence $+ $chr($calc(($asc($left(%sentence,1)) - 84 ) % 26 + 97)) }
var %sentence = $right(%sentence,-1)
}
msg $chan %saysentence
}
;this is a lame script I coded myself. It basically turns 'These Words'
;into 'ThEsE wOrDs'. Which looks lame hence the name!
;this bit has finally been recoded for 1.04 <RC2> :)
;<secret>iCeShAmAn PwNs</secret>
alias ifblame {
if ($4- == $null) { msg $chan Please set a sentence to lamerise | return }
var %sentence = $$4-
while (%sentence) {
if ($left(%sentence,1) isalpha) {
var %type = $iif(%type == 1,2,1)
var %saysentence = %saysentence $+ $iif(%type == 1,$lower($left(%sentence,1)),$upper($left(%sentence,1)))
}
else { var %saysentence = %saysentence $+ $iif($asc($left(%sentence,1)) == 32,$chr(160),$left(%sentence,1)) }
var %sentence = $right(%sentence,-1)
}
msg $chan %saysentence
}
alias -l ifbunlame {
if ($4 == caps) || ($4 == caps,) { msg $chan $upper($5-) | return }
if ($4 == nocaps) || ($4 == nocaps,) { msg $chan $lower($5-) | return }
if ($4 == $null) { msg $chan Please Set A Format And sentence To Unlamerise | return }
else { msg $chan Please Set A Format (Caps Or Nocaps) | return }
}
;ascii shifter
alias -l ifbshift {
if (!$5) { msg $chan Please Set A sentence To ASCII Shift shift | return }
if ($4 !isnum -999-999) { msg $chan Please Include A Number Between 1 and 999 | halt }
var %sentence = $5-, %shiftnum = $iif($2 == encrypt,$4,- $+ $4)
while (%sentence) {
if ($left(%sentence,1) == $chr(32)) || ($left(%sentence,1) == $chr(160)) { var %saysentence = %saysentence $+ $chr(160) }
else { var %saysentence = %saysentence $+ $chr($calc(%shiftnum + $asc($left(%sentence,1)))) }
var %sentence = $right(%sentence,-1)
}
msg $chan %saysentence
}
alias -l ifbbackwards {
var %backwardsword = $$4-, %backwardslen = $len($$4-), %backwardsdone = 0
while (%backwardsdone < %backwardslen) {
inc %backwardsdone 1
var %backwardssay = $mid(%backwardsword,%backwardsdone,1) $+ %backwardssay
}
msg $chan %backwardssay
}
alias -l ifbmd5 {
msg $chan $md5($$4-)
}
alias -l ifbdns {
if (%ifbdnshost == enabled) {
set %dnsreplychan $chan | .dns $3-
}
else { return }
}
alias -l ifbhi {
if (%ifbhi != enabled) { return }
if ($ifbflood == $true) { set -u $+ %ifbfloodignoretime % $+ ifblobotomy enabled }
if (%ifbcustombotreply == enabled) { msg $chan $readini(%ifbdir $+ \ $+ %ifbconfigfile,helloreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,helloreply,$rand(1,$ini(%ifbdir $+ \ $+ %ifbconfigfile,helloreply,0)))) }
}
;This is the mighty dynamic help coding.
alias -l ifblisthelp {
if (%ifbhelp == enabled) {
var %ifbhelp-entries = $ini(%ifbdir $+ \ $+ %ifbhelpfile,topics,0), %ifbhelp-done = 0
while (%ifbhelp-done < %ifbhelp-entries) {
inc %ifbhelp-done
var %ifbhelp-database = %ifbhelp-database $ini(%ifbdir $+ \ $+ %ifbhelpfile,topics,%ifbhelp-done) $+ $chr(44)
}
var %ifbhelp-database = $left(%ifbhelp-database,$calc($len(%ifbhelp-database) - 1))
if ($strip($2) == $null) {
.msg $nick I Learn Mainly by Observing Declarative statements Such As "x is at http://xxx.xxx.xxx", And Then Reply When People Ask Things Like " $+ $me $+ , x"
.msg $nick $ini(%ifbdir $+ \ $+ %ifbhelpfile,topics,0) $iif($ini(%ifbdir $+ \ $+ %ifbhelpfile,topics,0) > 1,Topics,Topic) $+ : %ifbhelp-database
.msg $nick For Help On A Specific Function Please Use: Help <Function>
}
elseif ($2 isin %ifbhelp-database) { ifbreadhelp $2- }
elseif ($3 isin %ifbhelp-database) { ifbreadhelp $3- }
else { .msg $nick No Help On ' $+ $2 $+ ' - Use 'Help' Without Arguments. }
}
else { return }
}
;Multi-lined help - inspired and partly coded by heinz
alias -l ifbreadhelp {
var %ifbhelpreadline = $readini(%ifbdir $+ \ $+ %ifbhelpfile,topics,$$1)
if (!%ifbhelpreadline) { msg $nick No Help On ' $+ $$1 $+ ' - Use 'Help' Without Arguments. }
:beginreadhelp
if (<newline> isin %ifbhelpreadline) {
var %ifbhelpsayline = $left(%ifbhelpreadline,$calc($pos(%ifbhelpreadline,<newline>,1) - 1))
.msg $nick %ifbhelpsayline
var %ifbhelpreadline = $replace(%ifbhelpreadline,%ifbhelpsayline <newline>,$null)
goto beginreadhelp
}
else { .msg $nick %ifbhelpreadline | return }
}
alias -l ifbhelpnick {
if ($3 == database) && ($chan != $null) {
if ($ifbisadmin == $true) || ($ifbismaster(help) == $true) {
if ($4 == add) {
if ($readini(%ifbdir $+ \ $+ %ifbhelpfile,topics,$5) == $null) { write %ifbdir $+ \ $+ %ifbhelpfile $5 | writeini -n %ifbdir $+ \ $+ %ifbhelpfile topics $5 $6- | msg $chan Topic ' $+ $5 $+ ' Created }
else { msg $chan Help Topic ' $+ $5 $+ ' Already Exists | return }
}
if ($4 == del) {
if ($readini(%ifbdir $+ \ $+ %ifbhelpfile,topics,$5) != $null) { write -ds $+ $5 %ifbdir $+ \ $+ %ifbhelpfile | remini -n %ifbdir $+ \ $+ %ifbhelpfile topics $5 | msg $chan Topic ' $+ $5 $+ ' Deleted }
else { msg $chan Help Topic ' $+ $5 $+ ' Does Not Exist | return }
}
if ($4 == edit) {
if ($readini(%ifbdir $+ \ $+ %ifbhelpfile,topics,$5) != $null) { writeini -n %ifbdir $+ \ $+ %ifbhelpfile topics $5 $6- | msg $chan Topic ' $+ $5 $+ ' Edited }
else { msg $chan Help Topic ' $+ $5 $+ ' Does Not Exist | return }
}
if ($4 == clear) { write -c %ifbdir $+ \ $+ %ifbhelpfile | remini -n %ifbdir $+ \ $+ %ifbhelpfile topics | msg $chan Help Database Cleared }
if ($4 == list) { msg $chan There Are ' $+ %ifbhelp-number $+ ' Topics In My Help Database }
}
else { msg $chan I Am Not Allowed To Use The Help Admin Function $nick }
}
else { ifblisthelp $2- }
}
alias ifbaddhelp { writeini -n %ifbdir $+ \ $+ %ifbhelpfile topics $$1 $$2- }
alias ifbdelhelp { remini -n %ifbdir $+ \ $+ %ifbhelpfile topics $$1 }
alias ifbautobackup {
if (%ifbautobackupnum == $null) { set %ifbautobackupnum 0 }
if (%ifbautobackupnum >= 50) { set %ifbautobackupnum 0 }
inc %ifbautobackupnum 1
if ($exists(%ifbdir $+ \ $+ autobackup) != $true) { .mkdir %ifbdir $+ \ $+ autobackup }
if ($exists(%ifbdir $+ \ $+ %ifbconfigfile) == $true) { .copy -o %ifbdir $+ \ $+ %ifbconfigfile %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini | remini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini settings }
if (%ifbversion != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini variables version %ifbversion }
if (%ifbstatus != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini variables status %ifbstatus }
if (%ifbdir != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini variables directory %ifbdir }
if (%ifbauthor != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini variables author %ifbauthor }
if (%ifbinfofile != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini files infofile %ifbinfofile }
if (%ifbconfigfile != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini files configfile %ifbconfigfile }
if (%ifbhacklogfile != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini files hacklogfile %ifbhacklogfile }
if (%ifbhelpfile != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini files helpfile %ifbhelpfile }
if ($did($dname,134).text != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini files backupfile $did($dname,134).text }
if ($did($dname,139).text != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini files backupfile $did($dname,139).text }
if (%ifbmasteradmin != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini admin admin %ifbmasteradmin }
if (%ifbmasteradmin-code != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini admin admin-code %ifbmasteradmin-code }
if (%ifbmasteradmin-host != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini admin admin-host %ifbmasteradmin-host }
if (%ifbsetnumber != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini factoids setnumber %ifbsetnumber }
if (%ifbhelp-number != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini help number %ifbhelp-number }
if (%ifbhelp-database != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini help database %ifbhelp-database }
if (%ifbsetfactoid != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini settings setfactoid %ifbsetfactoid }
if (%ifbmultifactoid != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini settings multifactoid %ifbmultifactoid }
if (%ifblocked != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini settings lockfactoid %ifblocked }
if (%ifbforget != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini settings forgetfactoid %ifbforget }
if (%ifbbanner != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini banner banner1 %ifbbanner }
if (%ifbkarmanum != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini karma number %ifbkarmanum }
if (%ifbkarmaword1 != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini karma word1 %ifbkarmaword1 }
if (%ifbkarmaword2 != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini karma word2 %ifbkarmaword2 }
if (%ifbkarmaword3 != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini karma word3 %ifbkarmaword3 }
if (%ifbkarmaword4 != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini karma word4 %ifbkarmaword4 }
if (%ifbkarmaword5 != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini karma word5 %ifbkarmaword5 }
if (%ifbcustombotreply != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini commands custombotreply enabled }
if (%ifbfactinfo != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini commands factinfo enabled }
if (%ifbendecrypt != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini commands endecrypt enabled }
if (%ifbfactnum != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini commands factnum enabled }
if (%ifbstats != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini commands stats enabled }
if (%ifbnickometer != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini commands nickometer enabled }
if (%ifbkarma != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini commands karma enabled }
if (%ifbstatus != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini commands status enabled }
if (%ifbcalculate != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini commands calculate enabled }
if (%ifbdatetime != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini commands datetime enabled }
if (%ifbdnshost != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini commands dnshost enabled }
if (%ifbtell != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini commands tell enabled }
if (%ifbhi != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini commands hi enabled }
if (%ifbbotask != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini commands botaskreply enabled }
if (%ifbbotaskreply != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini commands botask enabled }
if (%ifbhacklog != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini commands hacklog enabled }
if (%ifbautoclose != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini options autoclose enabled }
if (%ifbautoclosetime isnum) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini options autoclosetime %ifbautoclosetime }
if (%ifbfloodprotect != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini options floodprotect enabled }
if (%ifbfloodtime isnum) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini options floodtime %ifbfloodtime }
if (%ifbfloodignoretime isnum) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini options floodignoretime %ifbfloodignoretime }
if (%ifblobotomy != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini options lobotomy enabled }
if (%ifbsetfactoid != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini options setfactoid enabled }
if (%ifblocked != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini options lockfactoid enabled }
if (%ifbforget != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini options forgetfactoid enabled }
if (%ifbautobackup != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini options autobackup enabled }
if (%ifbautobackuptime isnum) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini options autobackuptime %ifbautobackuptime }
.copy -o %ifbdir $+ \ $+ %ifbinfofile %ifbdir $+ \autobackup\ $+ factoidsbackup $+ %ifbautobackupnum $+ .ini
}
alias -l ifbbackup {
if ($exists(%ifbdir $+ \ $+ backup) != $true) { .mkdir %ifbdir $+ \ $+ backup }
if ($1- == $null) { return }
if (($$1 == settings) && ($$2 == true)) { goto backupsettings }
if (($$1 == factoids) && ($$2 == true)) { goto backupfactoids }
:backupsettings
if ($exists(%ifbdir $+ \ $+ %ifbconfigfile) == $true) { .copy -o %ifbdir $+ \ $+ %ifbconfigfile %ifbdir $+ \backup\ $+ %ifbbackupfile | remini -n %ifbdir $+ \backup\ $+ %ifbbackupfile settings }
if (%ifbversion != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile variables version %ifbversion }
if (%ifbstatus != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile variables status %ifbstatus }
if (%ifbdir != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile variables directory %ifbdir }
if (%ifbauthor != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile variables author %ifbauthor }
if (%ifbinfofile != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile files infofile %ifbinfofile }
if (%ifbconfigfile != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile files configfile %ifbconfigfile }
if (%ifbhacklogfile != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile files hacklogfile %ifbhacklogfile }
if (%ifbhelpfile != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile files helpfile %ifbhelpfile }
if ($did($dname,134).text != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile files backupfile $did($dname,134).text }
if ($did($dname,139).text != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile files backupfile $did($dname,139).text }
if (%ifbmasteradmin != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile admin admin %ifbmasteradmin }
if (%ifbmasteradmin-code != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile admin admin-code %ifbmasteradmin-code }
if (%ifbmasteradmin-host != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile admin admin-host %ifbmasteradmin-host }
if (%ifbsetnumber != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile factoids setnumber %ifbsetnumber }
if (%ifbhelp-number != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile help number %ifbhelp-number }
if (%ifbhelp-database != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile help database %ifbhelp-database }
if (%ifbsetfactoid != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile settings setfactoid %ifbsetfactoid }
if (%ifbmultifactoid != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile settings multifactoid %ifbmultifactoid }
if (%ifblocked != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile settings lockfactoid %ifblocked }
if (%ifbforget != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile settings forgetfactoid %ifbforget }
if (%ifbbanner != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile banner banner1 %ifbbanner }
if (%ifbkarmanum != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile karma number %ifbkarmanum }
if (%ifbkarmaword1 != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile karma word1 %ifbkarmaword1 }
if (%ifbkarmaword2 != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile karma word2 %ifbkarmaword2 }
if (%ifbkarmaword3 != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile karma word3 %ifbkarmaword3 }
if (%ifbkarmaword4 != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile karma word4 %ifbkarmaword4 }
if (%ifbkarmaword5 != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile karma word5 %ifbkarmaword5 }
if (%ifbcustombotreply != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile commands custombotreply enabled }
if (%ifbfactinfo != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile commands factinfo enabled }
if (%ifbendecrypt != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile commands endecrypt enabled }
if (%ifbfactnum != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile commands factnum enabled }
if (%ifbstats != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile commands stats enabled }
if (%ifbnickometer != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile commands nickometer enabled }
if (%ifbkarma != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile commands karma enabled }
if (%ifbstatus != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile commands status enabled }
if (%ifbcalculate != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile commands calculate enabled }
if (%ifbdatetime != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile commands datetime enabled }
if (%ifbdnshost != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile commands dnshost enabled }
if (%ifbtell != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile commands tell enabled }
if (%ifbhi != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile commands hi enabled }
if (%ifbbotask != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile commands botask enabled }
if (%ifbbotreplyadd != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile commands botaskreply enabled }
if (%ifbhacklog != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile commands hacklog enabled }
if (%ifbautoclose != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile options autoclose enabled }
if (%ifbautoclosetime isnum) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile options autoclosetime %ifbautoclosetime }
if (%ifbfloodprotect != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile options floodprotect enabled }
if (%ifbfloodtime isnum) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile options floodtime %ifbfloodtime }
if (%ifbfloodignoretime isnum) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile options floodignoretime %ifbfloodignoretime }
if (%ifblobotomy != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile options lobotomy enabled }
if (%ifbsetfactoid != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile options setfactoid enabled }
if (%ifblocked != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile options lockfactoid enabled }
if (%ifbforget != $null) { writeini -n %ifbdir $+ \backup\ $+ %ifbbackupfile options forgetfactoid enabled }
if (%ifbautobackup != $null) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini options autobackup enabled }
if (%ifbautobackuptime isnum) { writeini -n %ifbdir $+ \autobackup\ $+ settingsbackup $+ %ifbautobackupnum $+ .ini options autobackuptime %ifbautobackuptime }
return
:backupfactoids
.copy -o %ifbdir $+ \ $+ %ifbinfofile %ifbdir $+ \backup\ $+ %ifbbackup2file
return
}
alias -l ifbrestore {
if ($exists(%ifbdir $+ \backup\ $+ %ifbbackupfile) == $true) {
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,variables,version) != $null) { set %ifbversion $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,variables,version) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,variables,status) != $null) { set %ifbstatus $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,variables,status) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,variables,directory) != $null) { set %ifbdir $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,variables,directory) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,variables,author) != $null) { set %ifbauthor $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,variables,author) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,files,infofile) != $null) { set %ifbinfofile $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,files,infofile) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,files,configfile) != $null) { set %ifbconfigfile $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,files,configfile) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,files,hacklogfile) != $null) { set %ifbhacklogfile $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,files,hacklogfile) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,files,helpfile) != $null) { set %ifbhelpfile $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,files,helpfile) }
if ($did($dname,136).text != $null) { set %ifbbackup2file $did($dname,136).text }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,admin,admin) != $null) { set %ifbmasteradmin $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,admin,admin) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,factoids,setnumber) != $null) { set %ifbsetnumber $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,factoids,setnumber) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,help,number) != $null) { set %ifbhelp-number $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,help,number) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,help,database) != $null) { set %ifbhelp-database $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,help,database) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,settings,setfactoid) != $null) { set %ifbsetfactoid $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,settings,setfactoid) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,settings,multifactoid) != $null) { set %ifbmultifactoid $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,settings,multifactoid) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,settings,lockfactoid) != $null) { set %ifblocked $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,settings,lockfactoid) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,settings,forgetfactoid) != $null) { set %ifbforget $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,settings,forgetfactoid) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,banner,banner1) != $null) { set %ifbbanner $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,banner,banner1) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,karma,number) != $null) { set %ifbkarmanum $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,karma,number) | writeini -n %ifbdir $+ \ $+ %ifbconfigfile karma number $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,karma,number) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,karma,word1) != $null) { set %ifbkarmaword1 $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,karma,word1) | writeini -n %ifbdir $+ \ $+ %ifbconfigfile karma word1 $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,karma,word1) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,karma,word2) != $null) { set %ifbkarmaword2 $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,karma,word2) | writeini -n %ifbdir $+ \ $+ %ifbconfigfile karma word2 $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,karma,word2) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,karma,word3) != $null) { set %ifbkarmaword3 $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,karma,word3) | writeini -n %ifbdir $+ \ $+ %ifbconfigfile karma word3 $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,karma,word3) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,karma,word4) != $null) { set %ifbkarmaword4 $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,karma,word4) | writeini -n %ifbdir $+ \ $+ %ifbconfigfile karma word4 $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,karma,word4) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,karma,word5) != $null) { set %ifbkarmaword5 $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,karma,word5) | writeini -n %ifbdir $+ \ $+ %ifbconfigfile karma word5 $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,karma,word5) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,banner,banner1) != $null) { set %ifbbanner $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,banner,banner1) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,custombotreply) != $null) { set %ifbcustombotreply $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,custombotreply) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,factinfo) != $null) { set %ifbfactinfo $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,factinfo) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,endecrypt) != $null) { set %ifbendecrypt $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,endecrypt) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,factnum) != $null) { set %ifbfactnum $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,factnum) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,stats) != $null) { set %ifbstats $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,stats) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,nickometer) != $null) { set %ifbnickometer $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,nickometer) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,karma) != $null) { set %ifbkarma $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,karma) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,status) != $null) { set %ifbstatus $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,status) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,calculate) != $null) { set %ifbcalculate $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,calculate) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,datetime) != $null) { set %ifbdatetime $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,datetime) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,dnshost) != $null) { set %ifbdnshost $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,dnshost) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,tell) != $null) { set %ifbtell $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,tell) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,hi) != $null) { set %ifbhi $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,hi) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,botask) != $null) { set %ifbbotask $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,botask) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,botaskreply) != $null) { set %ifbbotaskreply $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,botaskreply) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,hacklog) != $null) { set %ifbhacklog $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,hacklog) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,options,lobotomy) != $null) { set %ifblobotomy $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,commands,lobotomy) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,options,autobackup) != $null) { set %ifbautobackup $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,options,autobackup) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,options,autobackuptime) != $null) { set %ifbautobackuptime $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,options,autobackuptime) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,options,autoclose) != $null) { set %ifbautoclose $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,options,autoclose) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,options,autoclosetime) != $null) { set %ifbautoclosetime $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,options,autoclosetime) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,options,floodprotect) != $null) { set %ifbfloodprotect $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,options,floodprotect) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,options,floodtime) != $null) { set %ifbfloodtime $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,options,floodtime) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,options,floodignoretime) != $null) { set %ifbfloodignoretime $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,options,floodignoretime) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,options,setfactoid) != $null) { set %ifbsetfactoid $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,options,setfactoid) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,options,lockfactoid) != $null) { set %ifblocked $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,options,lockfactoid) }
if ($readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,options,forgetfactoid) != $null) { set %ifbforget $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,options,forgetfactoid) }
if ($ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,replys,0) != $null) {
var %ifbbackupreplys = $ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,replys,0)
while (%ifbbackupreplys > 0) {
writeini -n %ifbdir $+ \ $+ %ifbconfigfile replys $ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,replys,%ifbbackupreplys) $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,n,replys,$ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,replys,%ifbbackupreplys))
dec %ifbbackupreplys
}
}
if ($ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,helloreply,0) != $null) {
var %ifbbackuphello = $ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,helloreply,0)
while (%ifbbackuphello > 0) {
writeini -n %ifbdir $+ \ $+ %ifbconfigfile helloreply $ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,helloreply,%ifbbackuphello) $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,n,helloreply,$ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,helloreply,%ifbbackuphello))
dec %ifbbackuphello
}
}
if ($ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,unknownreply,0) != $null) {
var %ifbbackupunknown = $ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,unknownreply,0)
while (%ifbbackupunknown > 0) {
writeini -n %ifbdir $+ \ $+ %ifbconfigfile unknownreply $ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,unknownreply,%ifbbackupunknown) $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,n,unknownreply,$ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,unknownreply,%ifbbackupunknown))
dec %ifbbackupunknown
}
}
if ($ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,botask,0) != $null) {
var %ifbbackupbotask = $ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,botask,0)
while (%ifbbackupbotask > 0) {
writeini -n %ifbdir $+ \ $+ %ifbconfigfile botask $ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,botask,%ifbbackupbotask) $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,n,botask,$ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,botask,%ifbbackupbotask))
dec %ifbbackupbotask
}
}
if ($ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,hacklog,0) != $null) {
var %ifbbackuphacklog = $ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,hacklog,0)
while (%ifbbackuphacklog > 0) {
writeini -n %ifbdir $+ \ $+ %ifbconfigfile hacklog $ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,hacklog,%ifbbackuphacklog) $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,n,hacklog,$ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,hacklog,%ifbbackuphacklog))
dec %ifbbackuphacklog
}
}
if ($ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,prefixreply,0) != $null) {
var %ifbbackupprefix = $ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,prefixreply,0)
while (%ifbbackupprefix > 0) {
writeini -n %ifbdir $+ \ $+ %ifbconfigfile prefixreply $ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,prefixreply,%ifbbackupprefix) $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,n,prefixreply,$ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,prefixreply,%ifbbackupprefix))
dec %ifbbackupprefix
}
}
if ($ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,forbid,0) != $null) {
var %ifbbackupforbid = $ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,forbid,0)
while (%ifbbackupforbid > 0) {
writeini -n %ifbdir $+ \ $+ %ifbconfigfile forbid $ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,forbid,%ifbbackupforbid) $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,n,forbid,$ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,forbid,%ifbbackupforbid))
dec %ifbbackupforbid
}
}
if ($ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,masters,0) != $null) {
var %ifbbackupmasters = $ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,masters,0)
while (%ifbbackupmasters > 0) {
writeini -n %ifbdir $+ \ $+ %ifbconfigfile masters $ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,masters,%ifbbackupmasters) $readini(%ifbdir $+ \backup\ $+ %ifbbackupfile,n,masters,$ini(%ifbdir $+ \backup\ $+ %ifbbackupfile,masters,%ifbbackupmasters))
dec %ifbbackupmasters
}
}
if ($1 != $null) { msg $chan Settings Restored Successfully }
}
else {
if ($1 != $null) { msg $chan Error: The Restore File Does Not Exist }
else { echo -a Error: The Restore File Does Not Exist }
}
}
alias -l ifbrestorefactoids {
if ($exists(%ifbdir $+ \backup\ $+ %ifbbackup2file) == $true) { .copy -o %ifbdir $+ \backup\ $+ %ifbbackup2file %ifbdir $+ \ $+ %ifbinfofile | msg $1 Factoids Restored To ' $+ %ifbbackup2file $+ ' }
else { msg $1 Error: The Restore File Does Not Exist }
}
;Basic menu, nothing special, except for the pretty website, visit it...now
;Failure to visit the site will result in me hunting down and killing you...
;Don't you just hate it when authors write useless crappy comments for no reason?
;Oh well, another .01k wasted =(
menu menubar,channel {
InfoBloot
.Connection
..Options
...Name { .comopen OpenOptions WScript.Shell | .comclose OpenOptions $com(OpenOptions, SendKeys, 3, bstr, $chr(37) $+ O{HOME}) }
...Servers { .comopen OpenOptions WScript.Shell | .comclose OpenOptions $com(OpenOptions, SendKeys, 3, bstr, $chr(37) $+ O{HOME} $+ {DOWN}) }
..Connect { .server }
.-
.Options {
if ($dialog(options).title == $null) { dialog -dm options options }
else { echo -a Error: Dialog Window Already Open }
}
.-
.Addons
..$submenu($ifblistaddonmenu($1))
.-
.Website { .run http://infobloot.icenetwork.co.uk }
.-
.About { dialog -dm options options | did -f options 58 }
.-
.Uninstall { dialog -dm uninstall uninstall }
}
;Here starts the pretty dialogs I slaved over, then I gave up and used Dialog Studio...
dialog options {
title "// InfoBloot Options \\"
size -1 -1 228 150
option dbu
tab "Factoids", 1, 1 0 224 145
box "Factoid Options", 2, 5 20 189 40, tab 1
check "Set (Recommended)", 3, 8 27 70 8, tab 1
check "Multi Worded Factoids", 213, 17 36 64 7, tab 1
check "Lock/Unlock", 4, 8 43 70 8, tab 1
check "Forget (Recommended)", 5, 8 50 70 8, tab 1
text "This allows people to create factoids", 7, 90 27 102 8, tab 1
text "This allows factoids to be multi-worded", 214, 90 35 102 8, tab 1
text "This stops people from editing factoids", 8, 90 43 102 8, tab 1
text "This deletes factoids form the database", 9, 90 51 102 7, tab 1
box "File Names", 10, 5 61 189 40, tab 1
text "File InfoBloot stores factoids in (keep same if unsure)", 11, 62 69 130 8, tab 1
text "InfoBloot config/backup file (keep same if unsure)", 12, 62 80 130 8, tab 1
box "Status", 13, 5 103 73 25, tab 1
edit [ %ifbinfofile ], 19, 7 69 52 9, tab 1
edit [ %ifbconfigfile ], 22, 7 79 52 9, tab 1
edit [ %ifbhelpfile ], 20, 7 89 52 9, tab 1
text "InfoBloot help file (keep same if unsure)", 21, 62 90 130 8, tab 1
radio "Enabled", 14, 8 113 32 10, tab 1
radio "Disabled", 15, 43 113 32 10, tab 1
box "Set Factoid Number", 16, 81 103 113 25, tab 1
text "This changes the internal factoid counter.", 17, 86 110 109 8, tab 1
edit [ %ifbsetnumber ], 18, 119 117 34 9, tab 1
tab "Ratings", 23
check "Enable Karma (Factoid Rating System)", 24, 9 29 100 8, tab 23
edit [ %ifbkarmaword1 ], 25, 8 38 30 9, tab 23
text "For factoids that score 9+", 26, 42 39 75 8, tab 23
edit [ %ifbkarmaword2 ], 27, 8 48 30 9, tab 23
text "For factoids that score 6/8", 28, 42 49 75 8, tab 23
edit [ %ifbkarmaword3 ], 29, 8 58 30 9, tab 23
text "For factoids that score 5", 30, 42 59 75 8, tab 23
edit [ %ifbkarmaword4 ], 31, 8 68 30 9, tab 23
text "For factoids that score 3/4", 32, 42 69 75 8, tab 23
edit [ %ifbkarmaword5 ], 33, 8 78 30 9, tab 23
text "For factoids that score 2-", 34, 42 79 75 8, tab 23
box "Karma", 35, 5 20 114 88, tab 23
edit [ %ifbkarmanum ], 36, 47 88 30 9, tab 23
text "Number of points to +/- when a user votes", 37, 11 98 108 7, tab 23
box "Edit Karma", 40, 5 108 114 20, tab 23
edit "", 128, 30 116 50 10, tab 23
text "Factoid:", 129, 8 117 21 8, tab 23
edit "", 130, 100 116 17 10, tab 23
text "karma:", 131, 82 117 17 8, tab 23
box "InfoBloot Backup System", 132, 121 20 73 108, tab 23
text "Settings Backup File:", 135, 125 27 52 8, tab 23
button "Backup", 136, 125 46 32 12, tab 23
button "Restore", 137, 160 46 32 12, tab 23
text "Factoids Backup File:", 138, 125 61 52 8, tab 23
edit [ %ifbbackup2file ], 139, 124 69 69 10, tab 23
button "Backup", 141, 125 80 32 12, tab 23
button "Restore", 140, 160 80 32 12, tab 23
check "Enable Auto-Backup", 133, 125 95 67 10, tab 23
text "Auto-Backup Time (Hours)", 142, 126 106 68 8, tab 23
edit [ %ifbautobackuptime ], 143, 149 115 20 10, tab 23
edit [ %ifbbackupfile ], 134, 124 35 69 10, tab 23
tab "Channel", 38
box "HackLog", 104, 5 20 112 48, tab 38
check "Enable HackLog (see tutorial)", 105, 9 28 86 10, tab 38
text "Allowed Identifiers/Variables: *$nick is the same as $who*", 106, 9 38 85 14, tab 38
combo 107, 9 53 60 53, disable tab 38 edit drop
button "+", 108, 69 53 12 10, disable tab 38
button "-", 110, 82 53 12 10, disable tab 38
box "Log", 167, 95 26 20 37, tab 38
button "Load", 197, 97 34 16 13, disable tab 38
button "Clear", 196, 97 48 16 13, disable tab 38
box "Bot Ask", 159, 5 68 112 59, tab 38
text "This allows InfoBloot to ask another InfoBot protocol compatible bot if the factoid does is not in InfoBloot's database.", 160, 9 75 107 20, tab 38
check "Enable Bot Ask", 164, 9 95 48 10, tab 38
text "Bots to ask:", 165, 9 105 107 7, tab 38
combo 161, 9 113 53 35, disable tab 38 edit drop
button "Add", 162, 64 112 25 12, tab 38
button "Del", 163, 90 112 25 12, tab 38
box "Commands", 158, 119 20 75 107, tab 38
text "Enable/Disable commands", 170, 124 28 69 8, tab 38
check "Factinfo", 168, 124 36 30 7, tab 38
check "Factnum", 171, 124 44 50 7, tab 38
check "Stats", 172, 124 52 50 7, tab 38
check "Nickometer", 173, 124 60 50 7, tab 38
check "Karma", 174, 124 68 50 7, tab 38
check "Status", 175, 124 76 50 7, tab 38
check "Encrypt/Decrypt", 177, 124 84 50 7, tab 38
check "Calculate", 178, 124 92 50 7, tab 38
check "Date/Time", 169, 124 100 50 7, tab 38
check "DNS", 179, 124 108 50 7, tab 38
check "Tell", 180, 124 116 50 7, tab 38
check "Hi", 217, 162 36 16 8, tab 38
check "Add reply to factoid", 216, 57 97 58 7, disable tab 38
text "database.", 166, 65 103 27 8, disable tab 38
tab "Message", 39
box "InfoBloot Custom Replies", 49, 5 20 189 108, tab 39
check "Enable Custom Replies", 56, 11 28 65 8, tab 39
text "<factoid> will be replaced by the given factoid in a creation/deletion reply. ", 215, 95 24 101 13, tab 39
text "Random unknown factoid/command message(s):", 52, 11 37 127 7, tab 39
combo 50, 10 44 127 40, disable tab 39 edit drop
button "Add", 41, 139 44 25 10, disable tab 39 ok
button "Del", 42, 166 44 25 10, disable tab 39 ok
text "Message to send when factoid created:", 53, 11 55 127 7, tab 39
edit "", 51, 10 62 127 10, disable tab 39
button "Replace", 43, 139 62 25 10, disable tab 39 ok
button "Reset", 44, 166 62 25 10, disable tab 39 ok
text "Message to send when factoid deleted:", 54, 11 73 127 7, tab 39
edit "", 99, 10 80 127 10, disable tab 39
button "Replace", 45, 139 80 25 10, disable tab 39 ok
button "Reset", 46, 166 80 25 10, disable tab 39 ok
text "Random reply to hello:", 55, 11 90 127 7, tab 39
combo 100, 10 97 127 39, disable tab 39 edit drop
button "Add", 48, 139 97 25 10, disable tab 39 ok
button "Del", 47, 166 97 25 10, disable tab 39 ok
text "Random factoid retrieval prefix:", 208, 11 108 127 7, tab 39
combo 209, 10 115 127 10, disable tab 39 edit drop
button "Add", 210, 139 115 25 10, disable tab 39 ok
button "Del", 211, 166 115 25 10, disable tab 39 ok
tab "Admin", 57
box "Admin ", 101, 5 20 95 22, tab 57
text "Admin Name:", 103, 9 28 32 8, tab 57
edit "", 102, 42 27 55 10, tab 57
box "Masters", 109, 5 42 95 85, tab 57
combo 111, 8 50 89 65, tab 57 edit drop
check "Overrule/Edit/Block Factoids", 6, 8 62 78 7, tab 57
check "Forbid Words", 116, 44 86 44 7, tab 57
check "Channel ", 115, 8 78 31 7, tab 57
check "HackLog", 117, 8 87 32 7, tab 57
check "Ignore List", 118, 44 70 39 7, tab 57
check "Quit", 176, 8 103 20 7, tab 57
check "Admin", 212, 8 95 26 7, tab 57
check "Help", 204, 8 70 28 7, tab 57
check "Addons", 205, 44 78 28 7, tab 57
button "Save/Edit", 112, 8 114 29 10, tab 57
button "Delete", 113, 38 114 29 10, tab 57
button "Cancel", 114, 68 114 29 10, tab 57
box "Help", 198, 102 20 92 50, tab 57
check "Enable Help (see tutorial)", 199, 105 27 87 10, tab 57
combo 200, 105 38 46 31, disable tab 57 edit drop
button "Add", 201, 152 37 19 12, disable tab 57
button "Delete", 202, 172 37 20 12, disable tab 57
edit "", 203, 105 50 87 17, disable tab 57 multi vsbar
box "Flood Protection", 119, 102 70 92 57, tab 57
check "Enable Flood Protection", 120, 105 78 87 7, tab 57
text "Message limit for 5 seconds:", 123, 105 88 68 7, tab 57
edit "", 121, 173 87 19 9, tab 57
text "Ignore time in seconds:", 124, 105 97 68 7, tab 57
edit "", 125, 173 97 19 9, tab 57
check "Auto-Close Private Messages", 122, 105 107 86 7, tab 57
text "Auto-Close time in seconds:", 126, 105 116 68 7, tab 57
edit "", 127, 173 115 19 9, tab 57
button "View master code", 218, 38 94 59 9, tab 57
button "Reset master code", 219, 38 104 59 9, tab 57
tab "About/Info", 58
text "InfoBloot Author:", 77, 6 22 120 7, tab 58
text [ %ifbauthor ], 192, 66 22 120 7, tab 58
text "InfoBloot Version:", 78, 6 30 120 7, tab 58
text [ %ifbversion ], 193, 66 30 120 7, tab 58
text "mIRC Version", 75, 6 38 120 7, tab 58
text [ $version ], 194, 66 38 120 7, tab 58
text "Thanks To: nand, ken, DarkG, Wedge, all the beta testers, the InfoBot coders and mircscripts.org", 76, 6 45 120 22, tab 58
box "Update", 79, 6 66 120 30, tab 58
text "Current Version:", 73, 9 74 77 7, tab 58
text [ %ifbversion ], 195, 49 74 77 7, tab 58
text "Latest Version: ?", 74, 9 85 77 7, tab 58
button "Check", 71, 89 71 32 11, tab 58 ok
button "Update", 72, 89 83 32 11, tab 58 ok
box "About", 83, 6 98 120 30, tab 58
text "InfoBloot is copyright 2003 IceShaman. You", 80, 9 105 115 9, tab 58
text "can edit it as much as you like but please tell", 81, 9 112 115 9, tab 58
text "me first and keep my name in the code.", 82, 9 119 115 9, tab 58
box "Information", 84, 134 20 60 107, tab 58
text "InfoBloot was made", 59, 138 28 53 7, tab 58
text "as an mIRC version", 60, 138 36 53 7, tab 58
text "of InfoBot. But as", 61, 138 44 53 7, tab 58
text "Blootbot is edited from", 62, 138 52 53 7, tab 58
text "Infobot I decided to", 63, 138 60 53 7, tab 58
text "as well. I am only a", 64, 138 76 53 7, tab 58
text "put that in the name", 65, 138 68 53 7, tab 58
text "beginner scripter so", 66, 138 84 53 7, tab 58
text "feedback would be", 67, 138 92 53 7, tab 58
text "greatly appreciated.", 68, 138 100 53 7, tab 58
text "see the tutorial for", 69, 138 108 53 7, tab 58
text "my e-mail address.", 70, 138 116 53 7, tab 58
tab "Online", 85
edit "", 145, 6 23 89 93, tab 85 read multi vsbar
button "Latest News", 146, 29 118 37 12, tab 85
box "Addons", 144, 97 20 97 73, tab 85
text "Installed:", 150, 100 28 92 6, tab 85
combo 147, 100 34 92 11, disable tab 85 edit drop
button "Uninstall", 149, 107 46 38 12, disable tab 85
button "Information", 206, 147 46 38 12, disable tab 85
text "Available:", 151, 100 59 92 6, tab 85
combo 152, 100 65 92 11, tab 85 edit drop
button "Install", 153, 107 77 38 12, disable tab 85
button "Information", 207, 147 77 38 12, disable tab 85
box "Support", 148, 97 94 97 34, tab 85
button "Feedback", 154, 100 103 44 10, tab 85
button "Help", 155, 147 103 44 10, tab 85
button "Website", 156, 100 115 44 10, tab 85
button "Tutorial", 157, 147 115 44 10, tab 85
button "&Ok", 86, 112 131 25 13, flat ok
button "&Cancel", 87, 140 131 25 13, flat cancel
button "&Apply", 88, 168 131 25 13, flat
text "I", 89, 5 134 6 6, disable
text "C", 90, 15 134 6 6, disable
text "E", 91, 28 134 6 6, disable
text "S", 92, 40 134 6 6, disable
text "H", 93, 52 134 6 6, disable
text "A", 94, 64 134 6 6, disable
text "M", 95, 76 134 6 6, disable
text "A", 96, 88 134 6 6, disable
text "N", 97, 100 134 6 6, disable
icon 98, 196 25 26 117
box "", 181, 195 20 29 124
text "", 182, 208 26 0 8
text "I", 183, 197 26 25 8, hide center
text "N", 184, 197 40 25 8, hide center
text "F", 185, 197 53 25 8, hide center
text "O", 186, 197 66 25 8, hide center
text "B", 187, 197 79 25 8, hide center
text "L", 188, 197 93 25 8, hide center
text "O", 189, 197 106 25 8, hide center
text "O", 190, 197 120 25 8, hide center
text "T", 191, 197 134 25 8, hide center
}
on *:dialog:options:init:*:{
set %ifbsetnumbertemp %ifbsetnumber
if ($exists(%ifbdir $+ \ $+ InfoBloot.bmp) == $true) { did -g $dname 98 %ifbdir $+ \ $+ InfoBloot.bmp }
else { did -v $dname 183 | did -v $dname 184 | did -v $dname 185 | did -v $dname 186 | did -v $dname 187 | did -v $dname 188 | did -v $dname 189 | did -v $dname 190 | did -v $dname 191 }
if (%ifbsetfactoid == enabled) { did -c $dname 3 }
if (%ifbmultifactoid == enabled) { did -c $dname 213 }
if (%ifblocked == enabled) { did -c $dname 4 }
if (%ifbforget == enabled) { did -c $dname 5 }
if (%ifblobotomy == enabled) { did -c $dname 15 }
else { did -c $dname 14 }
if (%ifbkarma == enabled) { did -c $dname 24 }
if (%ifbautobackup != $null) { did -c $dname 133 }
if (%ifbautobackuptime != $null) { did -ra $dname 143 %ifbautobackuptime }
if (%ifbhacklog == enabled) {
did -c $dname 105
did -e $dname 107,108,110,196,197
did -i $dname 107 0 <No Selection>
if ($ini(%ifbdir $+ \ $+ %ifbconfigfile,hacklog,1) != $null) {
var %ifbhacklognum = 1
while (%ifbhacklognum <= $ini(%ifbdir $+ \ $+ %ifbconfigfile,hacklog,0)) {
did -a $dname 107 $ini(%ifbdir $+ \ $+ %ifbconfigfile,hacklog,%ifbhacklognum)
inc %ifbhacklognum 1
}
}
}
else { did -i $dname 107 0 <No Selection> }
if (%ifbbotask != $null) {
did -i $dname 161 0 <No Selection>
did -b $dname 161,163
if ($ini(%ifbdir $+ \ $+ %ifbconfigfile,botask,1) != $null) { did -b $dname 162 }
var %ifbbotasknum = 1
while (%ifbbotasknum <= $ini(%ifbdir $+ \ $+ %ifbconfigfile,botask,0)) {
did -a $dname 161 $readini(%ifbdir $+ \ $+ %ifbconfigfile,n,botask,$ini(%ifbdir $+ \ $+ %ifbconfigfile,botask,%ifbbotasknum))
inc %ifbbotasknum 1
}
}
else { did -b $dname 161 | did -b $dname 162 | did -b $dname 163 | did -i $dname 161 0 <No Selection> }
if (%ifbbotask == enabled) { did -c $dname 164 | did -e $dname 216,166,161 }
if (%ifbbotreplyadd == enabled) { did -c $dname 216 }
if (%ifbfactinfo == enabled) { did -c $dname 168 }
if (%ifbfactnum == enabled) { did -c $dname 171 }
if (%ifbstats == enabled) { did -c $dname 172 }
if (%ifbnickometer == enabled) { did -c $dname 173 }
if (%ifbkarma == enabled) { did -c $dname 174 }
if (%ifbstatus == enabled) { did -c $dname 175 }
if (%ifbendecrypt == enabled) { did -c $dname 177 }
if (%ifbcalculate == enabled) { did -c $dname 178 }
if (%ifbdatetime == enabled) { did -c $dname 169 }
if (%ifbdnshost == enabled) { did -c $dname 179 }
if (%ifbtell == enabled) { did -c $dname 180 }
if (%ifbhi == enabled) { did -c $dname 217 }
if (%ifbcustombotreply == enabled) { did -c $dname 56 | did -e $dname 50,41,42,51,43,44,99,45,46,100,48,47,209,210,211 }
if (%ifbfloodprotect == enabled) { did -c $dname 120 }
if (%ifbfloodtime isnum) { did -a $dname 121 %ifbfloodtime }
if (%ifbfloodignoretime isnum) { did -a $dname 125 %ifbfloodignoretime }
if (%ifbautoclose == enabled) { did -c $dname 122 }
if (%ifbautoclosetime isnum) { did -a $dname 127 %ifbautoclosetime }
if ($ini(%ifbdir $+ \ $+ %ifbconfigfile,unknownreply,1) != $null) {
var %ifbunknownmsgnum = 1
while (%ifbunknownmsgnum <= $ini(%ifbdir $+ \ $+ %ifbconfigfile,unknownreply,0)) {
did -a $dname 50 $readini(%ifbdir $+ \ $+ %ifbconfigfile,n,unknownreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,unknownreply,%ifbunknownmsgnum))
inc %ifbunknownmsgnum 1
}
}
if ($ini(%ifbdir $+ \ $+ %ifbconfigfile,helloreply,1) != $null) {
var %ifbhellomsgnum = 1
while (%ifbhellomsgnum <= $ini(%ifbdir $+ \ $+ %ifbconfigfile,helloreply,0)) {
did -a $dname 100 $readini(%ifbdir $+ \ $+ %ifbconfigfile,n,helloreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,helloreply,%ifbhellomsgnum))
inc %ifbhellomsgnum 1
}
}
if ($ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,1) != $null) {
var %ifbprefixnum = 1
while (%ifbprefixnum <= $ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,0)) {
did -a $dname 209 $readini(%ifbdir $+ \ $+ %ifbconfigfile,n,prefixreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,%ifbprefixnum))
inc %ifbprefixnum 1
}
}
if ($ini(%ifbdir $+ \ $+ %ifbconfigfile,unknownreply,1) != $null) { did -i $dname 50 0 $readini(%ifbdir $+ \ $+ %ifbconfigfile,n,unknownreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,unknownreply,1)) }
if ($ini(%ifbdir $+ \ $+ %ifbconfigfile,helloreply,1) != $null) { did -i $dname 100 0 $readini(%ifbdir $+ \ $+ %ifbconfigfile,n,helloreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,helloreply,1)) }
if ($ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,1) != $null) { did -i $dname 209 0 $readini(%ifbdir $+ \ $+ %ifbconfigfile,n,prefixreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,1)) }
did -a $dname 51 $readini(%ifbdir $+ \ $+ %ifbconfigfile,n,replys,creation)
did -a $dname 99 $readini(%ifbdir $+ \ $+ %ifbconfigfile,n,replys,deletion)
if (%ifbmasteradmin != $null) { did -a $dname 102 %ifbmasteradmin }
var %ifbmastersnum = 1
while (%ifbmastersnum <= $ini(%ifbdir $+ \ $+ %ifbconfigfile,masters,0)) {
did -a $dname 111 $ini(%ifbdir $+ \ $+ %ifbconfigfile,masters,%ifbmastersnum)
inc %ifbmastersnum 1
}
did -i $dname 111 0 <No Masters Selected>
did -b $dname 6,116,115,117,118,176,218,219,112,113,114,204,205,212
if ($ini(%ifbdir $+ \ $+ %ifbhelpfile,topics,1) != $null) {
var %ifbhelplist = 1
while (%ifbhelplist <= $ini(%ifbdir $+ \ $+ %ifbhelpfile,topics,0)) {
did -a $dname 200 $ini(%ifbdir $+ \ $+ %ifbhelpfile,topics,%ifbhelplist)
inc %ifbhelplist 1
}
}
if (%ifbhelp == enabled) { did -c $dname 199 | did -e $dname 200,201,202,203 | did -i $dname 200 0 <Select> }
if ($exists(%ifbdir $+ \addons\loaded-addons.txt) == $true) { did -ei $dname 147 0 <Select An Addon> | .loadbuf -o options 147 %ifbdir $+ \addons\loaded-addons.txt }
if ($exists(%ifbdir $+ \addons\) == $true) {
if ($exists(%ifbdir $+ \addons\available-addons.txt) == $true) { write -c %ifbdir $+ \addons\available-addons.txt }
else { write -c %ifbdir $+ \addons\available-addons.txt }
var %ifbavailableaddons = $findfile(%ifbdir $+ \addons\,*ifb,0,write %ifbdir $+ \addons\available-addons.txt $1-)
while (%ifbavailableaddons > 0) {
var %ifbaddonline = $read(%ifbdir $+ \addons\available-addons.txt,%ifbavailableaddons), %ifbslashnum = $pos(%ifbaddonline,\,0), %ifbslashpos = $pos(%ifbaddonline,\,%ifbslashnum)
write -l $+ %ifbavailableaddons %ifbdir $+ \addons\available-addons.txt $left($right(%ifbaddonline,$calc($len(%ifbaddonline) - %ifbslashpos)),$calc($len($right(%ifbaddonline,$calc($len(%ifbaddonline) - %ifbslashpos))) - 4))
dec %ifbavailableaddons 1
}
did -i $dname 152 0 <Select An Addon>
.loadbuf -o options 152 %ifbdir $+ \addons\available-addons.txt
}
else { did -i $dname 152 0 <No Addon Directory> | did -b $dname 152 }
}
on *:dialog:options:sclick:86,88: {
if ($did($dname,3).state == 1) { set %ifbsetfactoid enabled }
else { unset %ifbsetfactoid }
if ($did($dname,213).state == 1) { set %ifbmultifactoid enabled }
else { unset %ifbmultifactoid }
if ($did($dname,4).state == 1) { set %ifblocked enabled }
else { unset %ifblocked }
if ($did($dname,5).state == 1) { set %ifbforget enabled }
else { unset %ifbforget }
if ($did($dname,14).state == 0) { set %ifblobotomy enabled }
else { unset %ifblobotomy }
set %ifbinfofile $did($dname,19).text
set %ifbconfigfile $did($dname,22).text
set %ifbhelpfile $did($dname,20).text
if ($did($dname,18).text != %ifbsetnumbertemp) { set %ifbsetnumber $did($dname,18).text | unset %ifbsetnumbertemp }
else { unset %ifbsetnumbertemp }
set %ifbkarmaword5 $did($dname,33).text
set %ifbkarmaword4 $did($dname,31).text
set %ifbkarmaword3 $did($dname,29).text
set %ifbkarmaword2 $did($dname,27).text
set %ifbkarmaword1 $did($dname,25).text
set %ifbkarmanum $did($dname,36).text
if (($did($dname,128).text != $null) && ($did($dname,130).text isnum)) { writeini -n %ifbdir $+ \ $+ %ifbinfofile $did($dname,128).text karma $calc(%ifbkarmacurrent + $did($dname,130).text) }
if ($did($dname,133).state == 1) { set %ifbautobackup enabled }
else { unset %ifbautobackup }
if ($did($dname,143).text isnum) { set %ifbautobackuptime $did($dname,143).text | .timerifbautobackup 0 $calc(3600 * %ifbautobackuptime) ifbautobackup }
else { .timerifbautobackup off }
if ($did($dname,164).state == 1) { set %ifbbotask enabled }
else { unset %ifbbotask }
if ($did($dname,216).state == 1) { set %ifbbotreplyadd enabled }
else { unset %ifbbotreplyadd }
if ($did($dname,168).state == 1) { set %ifbfactinfo enabled }
else { unset %ifbfactinfo }
if ($did($dname,171).state == 1) { set %ifbfactnum enabled }
else { unset %ifbfactnum }
if ($did($dname,172).state == 1) { set %ifbstats enabled }
else { unset %ifbstats }
if ($did($dname,173).state == 1) { set %ifbnickometer enabled }
else { unset %ifbnickometer }
if ($did($dname,174).state == 1) { set %ifbkarma enabled }
else { unset %ifbkarma }
if ($did($dname,24).state == 1) { set %ifbkarma enabled }
else { unset %ifbkarma }
if ($did($dname,175).state == 1) { set %ifbstatus enabled }
else { unset %ifbstatus }
if ($did($dname,177).state == 1) { set %ifbendecrypt enabled }
else { unset %ifbendecrypt }
if ($did($dname,178).state == 1) { set %ifbcalculate enabled }
else { unset %ifbcalculate }
if ($did($dname,169).state == 1) { set %ifbdatetime enabled }
else { unset %ifbdatetime }
if ($did($dname,179).state == 1) { set %ifbdnshost enabled }
else { unset %ifbdnshost }
if ($did($dname,180).state == 1) { set %ifbtell enabled }
else { unset %ifbtell }
if ($did($dname,217).state == 1) { set %ifbhi enabled }
else { unset %ifbhi }
if ($did($dname,56).state == 1) { set %ifbcustombotreply enabled }
if ((($did($dname,102).text != %ifbmasteradmin) || (%ifbmasteradmin-code == $null)) && ($did($dname,102).text != $null)) {
var %ifbadmincode = $rand(1,9) $+ $rand(1,9) $+ $rand(1,9) $+ $rand(1,9) $+ $rand(1,9)
set %ifbmasteradmin $did($dname,102).text
set %ifbmasteradmin-code %ifbadmincode
echo -a 8,4You have changed the InfoBloot master admin, the new admin must now authenticate with: /msg $me authenticate %ifbadmincode
}
if ($did($dname,199).state == 1) { set %ifbhelp enabled }
else { unset %ifbhelp }
if ($did($dname,120).state == 1) { set %ifbfloodprotect enabled }
else { unset %ifbfloodprotect }
if ($did($dname,121).text != $null) { set %ifbfloodtime $did($dname,121).text }
else { unset %ifbfloodtime }
if ($did($dname,125).text != $null) { set %ifbfloodignoretime $did($dname,125).text }
else { unset %ifbfloodignoretime }
if ($did($dname,122).state == 1) { set %ifbautoclose enabled }
else { unset %ifbautoclose }
if ($did($dname,127).text != $null) { set %ifbautoclosetime $did($dname,127).text }
else { unset %ifbautoclosetime }
if ($did($dname,134).text != $null) { set %ifbbackupfile $did($dname,134).text }
else { unset %ifbbackupfile }
if ($did($dname,139).text != $null) { set %ifbbackup2file $did($dname,139).text }
else { unset %ifbbackup2file }
}
on *:dialog:options:sclick:136: {
if ($did($dname,134).text != $null) { set %ifbbackupfile $did($dname,134).text | ifbbackup settings true }
else { return }
}
on *:dialog:options:sclick:137: {
if ($did($dname,134).text != $null) { set %ifbbackupfile $did($dname,134).text | ifbrestore | dialog -x options }
else { return }
}
on *:dialog:options:sclick:141: {
set %ifbbackup2file $did($dname,139).text
ifbbackup factoids true
}
on *:dialog:options:sclick:140: {
if ($exists(%ifbdir $+ \backup\ $+ $did($dname,139).text) == $true) {
set %ifbbackup2file $did($dname,139).text
.copy -o %ifbdir $+ \backup\ $+ %ifbbackup2file %ifbdir $+ \ $+ %ifbinfofile
dialog -x options
}
else { msg $chan Error: The Backup Directory Does Not Exist }
}
on *:dialog:options:sclick:105: {
if ($did($dname,105).state == 1) { set %ifbhacklog enabled | did -e $dname 107,108,110,196,197 | did -i $dname 107 0 <No Selection> }
else { unset %ifbhacklog | did -b $dname 107,108,110,196,197 | did -i $dname 107 0 <No Selection> }
}
on *:dialog:options:sclick:108: {
if ($left($did($dname,107).text,1) == $chr(36)) || (($left($did($dname,107).text,1) == $chr(37)) && ($did($dname,107).text != <No Selection>) && ($readini(%ifbdir $+ \ $+ %ifbconfigfile,hacklog,$did($dname,107).text) == $null)) { writeini -n %ifbdir $+ \ $+ %ifbconfigfile hacklog $did($dname,107).text enabled | did -a $dname 107 $did($dname,107).text }
}
on *:dialog:options:sclick:110: {
if ($left($did($dname,107).text,1) == $chr(36)) || (($left($did($dname,107).text,1) == $chr(37)) && ($did($dname,107).text != <No Selection>) && ($readini(%ifbdir $+ \ $+ %ifbconfigfile,hacklog,$did($dname,107).text) != $null) && ($did($dname,107).sel != $null)) { remini -n %ifbdir $+ \ $+ %ifbconfigfile hacklog $did($dname,107).text | did -d $dname 107 $did($dname,107).sel | did -i $dname 107 0 <No Selection> }
}
on *:dialog:options:sclick:196: {
if ($exists(%ifbdir $+ \ $+ %ifbhacklogfile) == $true) {
if ($?!="Are you sure you want to clear HackLog?" == $true) { dialog -v options | write -c %ifbdir $+ \ $+ %ifbhacklogfile | dialog -ie options options }
else { dialog -v options }
}
else {
if ($dialog(msgbox).title == $null) { set %msgboxtitle Error | set %msgboxbuttons ok | set %msgboxmsg Cannot Clear HackLog, %ifbhacklogfile Does Not Exist. | dialog -am msgbox msgbox | return }
}
}
on *:dialog:options:sclick:197: {
if ($exists(%ifbdir $+ \ $+ %ifbhacklogfile) == $true) { .run %ifbdir $+ \ $+ %ifbhacklogfile }
else {
if ($dialog(msgbox).title == $null) { set %msgboxtitle Error | set %msgboxbuttons ok | set %msgboxmsg Cannot load HackLog, %ifbhacklogfile Does Not Exist. | dialog -am msgbox msgbox | return }
}
}
on *:dialog:options:sclick:164: {
if ($did($dname,164).state == 1) { did -e $dname 161,216,166 | did -b $dname 162 }
else { did -b $dname 216,166,161,162,163 }
}
on *:dialog:options:sclick:161: {
if (($did($dname,161).text != $null) && ($did($dname,161).text != <No Selection>)) { did -e $dname 163 }
}
on *:dialog:options:edit:161: { did -e $dname 162 }
on *:dialog:options:sclick:162: {
if (($did($dname,161).text != $null) && ($did($dname,161).text != <No Selection>) && ($readini(%ifbdir $+ \ $+ %ifbconfigfile,botask,$did($dname,161).text) == $null)) { writeini -n %ifbdir $+ \ $+ %ifbconfigfile botask id $+ $left($did($dname,161).text,1) $+ $rand(11111,99999) $+ $right($did($dname,161).text,1) $did($dname,161).text | did -a $dname 161 $did($dname,161).text | did -i $dname 161 0 $did($dname,161).text }
}
on *:dialog:options:sclick:163: {
if (($did($dname,161).text != $null) && ($did($dname,161).text != <No Selection>)) { remini -n %ifbdir $+ \ $+ %ifbconfigfile botask $ini(%ifbdir $+ \ $+ %ifbconfigfile,botask,$did($dname,161).sel) | did -d $dname 161 $did($dname,161).sel | did -i $dname 161 0 $readini(%ifbdir $+ \ $+ %ifbconfigfile,n,botask,$ini(%ifbdir $+ \ $+ %ifbconfigfile,botask,1)) | did -i $dname 161 0 <No Selection> | did -b $dname 163 }
}
on *:dialog:options:sclick:56: {
if ($did($dname,56).state == 1) { set %ifbcustombotreply enabled | did -e $dname 50,41,42,51,43,44,99,45,46,100,48,47,209,210,211 }
else { unset %ifbcustombotreply | did -b $dname 50,41,42,51,43,44,99,45,46,100,48,47,209,210,211 }
}
on *:dialog:options:sclick:41: {
if ($did($dname,50).text != $null) { writeini -n %ifbdir $+ \ $+ %ifbconfigfile unknownreply id $+ $left($did($dname,50).text,1) $+ $rand(11111,99999) $+ $right($did($dname,50).text,1) $did($dname,50).text | did -a $dname 50 $did($dname,50).text | did -i $dname 50 0 $did($dname,50).text }
}
on *:dialog:options:sclick:42: {
if ($did($dname,50).sel != $null) { remini -n %ifbdir $+ \ $+ %ifbconfigfile unknownreply $ini(%ifbdir $+ \ $+ %ifbconfigfile,unknownreply,$did($dname,50).sel) | did -d $dname 50 $did($dname,50).sel | did -i $dname 50 0 $readini(%ifbdir $+ \ $+ %ifbconfigfile,n,unknownreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,unknownreply,1)) }
}
on *:dialog:options:sclick:43: {
if ($did($dname,51).text != $null) { writeini -n %ifbdir $+ \ $+ %ifbconfigfile replys creation $did($dname,51).text | did -ra $dname 51 $did($dname,51).text }
}
on *:dialog:options:sclick:44: { did -r $dname 51 }
on *:dialog:options:sclick:45: {
if ($did($dname,99).text != $null) { writeini -n %ifbdir $+ \ $+ %ifbconfigfile replys deletion $did($dname,99).text | did -ra $dname 99 $did($dname,99).text }
}
on *:dialog:options:sclick:46: { did -r $dname 99 }
on *:dialog:options:sclick:48: {
if ($did($dname,100).text != $null) { writeini -n %ifbdir $+ \ $+ %ifbconfigfile helloreply id $+ $left($did($dname,100).text,1) $+ $rand(11111,99999) $+ $right($did($dname,100).text,1) $did($dname,100).text | did -a $dname 100 $did($dname,100).text | did -i $dname 100 0 $did($dname,100).text }
}
on *:dialog:options:sclick:47: {
if ($did($dname,100).sel != $null) { remini -n %ifbdir $+ \ $+ %ifbconfigfile helloreply $ini(%ifbdir $+ \ $+ %ifbconfigfile,helloreply,$did($dname,100).sel) | did -d $dname 100 $did($dname,100).sel | did -i $dname 100 0 $readini(%ifbdir $+ \ $+ %ifbconfigfile,n,helloreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,helloreply,1)) }
}
on *:dialog:options:sclick:210: {
if ($did($dname,209).text != $null) { writeini -n %ifbdir $+ \ $+ %ifbconfigfile prefixreply id $+ $left($did($dname,209).text,1) $+ $rand(11111,99999) $+ $right($did($dname,209).text,1) $did($dname,209).text | did -a $dname 209 $did($dname,209).text | did -i $dname 209 0 $did($dname,209).text }
}
on *:dialog:options:sclick:211: {
if ($did($dname,209).sel != $null) { remini -n %ifbdir $+ \ $+ %ifbconfigfile prefixreply $ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,$did($dname,209).sel) | did -d $dname 209 $did($dname,209).sel | did -i $dname 209 0 $readini(%ifbdir $+ \ $+ %ifbconfigfile,n,prefixreply,$ini(%ifbdir $+ \ $+ %ifbconfigfile,prefixreply,1)) }
}
on *:dialog:options:edit:111: {
did -b $dname 113,218,219
did -u $dname 6,116,115,117,118,176,112,204,205,212
did -e $dname 6,116,115,117,118,176,112,114,204,205,212
if (overrule isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111).text)) { did -c $dname 6 }
if (forbid isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111).text)) { did -c $dname 116 }
if (chancommands isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111).text)) { did -c $dname 115 }
if (hacklog isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111).text)) { did -c $dname 117 }
if (ignore isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111).text)) { did -c $dname 118 }
if (quit isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111).text)) { did -c $dname 176 }
if (admin isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111).text)) { did -c $dname 212 }
if (help isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111).text)) { did -c $dname 204 }
if (addons isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111).text)) { did -c $dname 205 }
}
on *:dialog:options:sclick:111: {
did -e $dname 6,116,115,117,118,176,218,219,112,113,114,204,205,212
did -u $dname 6,116,115,117,118,176
if (overrule isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111,$did($dname,111).sel))) { did -c $dname 6 }
if (forbid isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111,$did($dname,111).sel))) { did -c $dname 116 }
if (chancommands isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111,$did($dname,111).sel))) { did -c $dname 115 }
if (hacklog isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111,$did($dname,111).sel))) { did -c $dname 117 }
if (ignore isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111,$did($dname,111).sel))) { did -c $dname 118 }
if (quit isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111,$did($dname,111).sel))) { did -c $dname 176 }
if (admin isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111,$did($dname,111).sel))) { did -c $dname 212 }
if (help isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111,$did($dname,111).sel))) { did -c $dname 204 }
if (addons isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111,$did($dname,111).sel))) { did -c $dname 205 }
}
on *:dialog:options:sclick:218: {
if ($readini(%ifbdir $+ \ $+ %ifbconfigfile,masters-code,$did($dname,111).text) == $null) {
if ($dialog(msgbox).title == $null) { set %msgboxtitle Error | set %msgboxbuttons ok | set %msgboxmsg $did($dname,111).text does not have an authenticated code, please use the reset button. | dialog -am msgbox msgbox | return }
}
else {
var %ifbmastercode = $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters-code,$did($dname,111).text)
if ($dialog(msgbox).title == $null) { set %msgboxtitle Error | set %msgboxbuttons ok | set %msgboxmsg The authentication code for $did($dname,111).text is: %ifbmastercode | dialog -am msgbox msgbox | return }
}
}
on *:dialog:options:sclick:219: {
var %ifbmastercode = $rand(1,9) $+ $rand(1,9) $+ $rand(1,9) $+ $rand(1,9) $+ $rand(1,9)
writeini %ifbdir $+ \ $+ %ifbconfigfile masters-code $did($dname,111).text %ifbmastercode
if ($dialog(msgbox).title == $null) { set %msgboxtitle Error | set %msgboxbuttons ok | set %msgboxmsg The authentication code for $did($dname,111).text has been reset to: %ifbmastercode | dialog -am msgbox msgbox | return }
}
on *:dialog:options:sclick:112: {
if ($readini(%ifbdir $+ \ $+ %ifbconfigfile,n,masters,$did($dname,111).text) == $null) {
did -a $dname 111 $did($dname,111).text
var %ifbmastercode = $rand(1,9) $+ $rand(1,9) $+ $rand(1,9) $+ $rand(1,9) $+ $rand(1,9)
writeini %ifbdir $+ \ $+ %ifbconfigfile masters-code $did($dname,111).text %ifbmastercode
if ($dialog(msgbox).title == $null) { set %msgboxtitle Master Added | set %msgboxbuttons ok | set %msgboxmsg $did($dname,111).text has been successfully added as a master but before they can access InfoBloot they must first be online to have their hosts added. To do this they must authenticate themselves with: /msg $me authenticate $did($dname,111).text %ifbmastercode | dialog -am msgbox msgbox }
}
remini -n %ifbdir $+ \ $+ %ifbconfigfile masters $did($dname,111).text
writeini -n %ifbdir $+ \ $+ %ifbconfigfile masters $did($dname,111).text true
if ($did($dname,6).state == 1) { writeini -n %ifbdir $+ \ $+ %ifbconfigfile masters $did($dname,111) $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111).text) overrule }
if ($did($dname,116).state == 1) { writeini -n %ifbdir $+ \ $+ %ifbconfigfile masters $did($dname,111).text $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111).text) forbid }
if ($did($dname,115).state == 1) { writeini -n %ifbdir $+ \ $+ %ifbconfigfile masters $did($dname,111).text $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111).text) chancommands }
if ($did($dname,117).state == 1) { writeini -n %ifbdir $+ \ $+ %ifbconfigfile masters $did($dname,111).text $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111).text) hacklog }
if ($did($dname,118).state == 1) { writeini -n %ifbdir $+ \ $+ %ifbconfigfile masters $did($dname,111).text $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111).text) ignore }
if ($did($dname,176).state == 1) { writeini -n %ifbdir $+ \ $+ %ifbconfigfile masters $did($dname,111).text $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111).text) quit }
if ($did($dname,212).state == 1) { writeini -n %ifbdir $+ \ $+ %ifbconfigfile masters $did($dname,111).text $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111).text) admin }
if ($did($dname,204).state == 1) { writeini -n %ifbdir $+ \ $+ %ifbconfigfile masters $did($dname,111).text $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111).text) help }
if ($did($dname,205).state == 1) { writeini -n %ifbdir $+ \ $+ %ifbconfigfile masters $did($dname,111).text $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$did($dname,111).text) addons }
did -e $dname 218,219,113
}
on *:dialog:options:sclick:113: {
if ($did($dname,111).text != <No Masters Selected>) {
if ($?!="Are you sure you want to delete master $did($dname,111).text $+ ?" == $true) {
dialog -v options
remini -n %ifbdir $+ \ $+ %ifbconfigfile masters $did($dname,111).text
if (($did($dname,111).sel == $null) && ($ini(%ifbdir $+ \ $+ %ifbconfigfile,masters,1) != $did($dname,111).text)) { did -u $dname 6,116,115,117,118,176 | did -i $dname 111 0 <No Masters Selected> | return }
elseif ($did($dname,111).sel == $null) { did -d $dname 111 1 | goto delmasternxt }
else { did -d $dname 111 $did($dname,111).sel | goto delmasternxt }
:delmasternxt
did -u $dname 6,116,115,117,118,176
if ($readini(%ifbdir $+ \ $+ %ifbconfigfile,n,masters,$ini(%ifbdir $+ \ $+ %ifbconfigfile,masters,1)) != $null) {
did -i $dname 111 0 $ini(%ifbdir $+ \ $+ %ifbconfigfile,masters,1)
if (overrule isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$ini(%ifbdir $+ \ $+ %ifbconfigfile,masters,1))) { did -c $dname 6 }
if (forbid isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$ini(%ifbdir $+ \ $+ %ifbconfigfile,masters,1))) { did -c $dname 116 }
if (chancommands isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$ini(%ifbdir $+ \ $+ %ifbconfigfile,masters,1))) { did -c $dname 115 }
if (hacklog isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$ini(%ifbdir $+ \ $+ %ifbconfigfile,masters,1))) { did -c $dname 117 }
if (ignore isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$ini(%ifbdir $+ \ $+ %ifbconfigfile,masters,1))) { did -c $dname 118 }
if (quit isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$ini(%ifbdir $+ \ $+ %ifbconfigfile,masters,1))) { did -c $dname 176 }
if (help isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$ini(%ifbdir $+ \ $+ %ifbconfigfile,masters,1))) { did -c $dname 205 }
if (addons isin $readini(%ifbdir $+ \ $+ %ifbconfigfile,masters,$ini(%ifbdir $+ \ $+ %ifbconfigfile,masters,1))) { did -c $dname 206 }
}
}
else { dialog -v options }
}
else {
if ($dialog(msgbox).title == $null) { set %msgboxtitle Error | set %msgboxbuttons ok | set %msgboxmsg No Masters Selected. | dialog -am msgbox msgbox | return }
}
}
on *:dialog:options:sclick:114: { did -i $dname 111 0 <No Masters Selected> | did -u $dname 6,116,115,117,118,176,204,205,212 | did -b $dname 6,116,115,117,118,176,218,219,112,113,114,204,205,212 }
on *:dialog:options:sclick:199: {
if ($did($dname,199).state == 1) { did -i $dname 200 0 <Select> | did -e $dname 200,201,202,203 }
else { did -b $dname 200,201,202,203 }
}
on *:dialog:options:sclick:71: {
if ($sock(ifbupdate,name) == 0) { .sockopen ifbupdate infobloot.icenetwork.co.uk 80 }
else { echo -a Error: Already Checking For Updates }
}
on *:dialog:options:sclick:72: { .run http://infobloot.icenetwork.co.uk }
on *:dialog:options:sclick:146: {
if ($sock(ifbnews,name) == 0) { .sockopen ifbnews infobloot.icenetwork.co.uk 80 }
else { echo -a Error: Already Checking For News }
}
on *:dialog:options:sclick:154: {
if ($dialog(msgbox).title == $null) { set %msgboxtitle Feedback | set %msgboxbuttons ok | set %msgboxmsg You can give feedback by either using the form on the InfoBloot website or by e-mailing me at: iceshaman@icenetwork.co.uk | dialog -am msgbox msgbox | return }
}
on *:dialog:options:sclick:155: {
if ($exists(%ifbdir $+ \ $+ ifbreadme.txt) == $true) { .run %ifbdir $+ \ $+ ifbreadme.txt }
else {
if ($dialog(msgbox).title == $null) { set %msgboxtitle Error | set %msgboxbuttons ok | set %msgboxmsg Cannot Locate The InfoBloot Readme. | dialog -am msgbox msgbox | return }
}
}
on *:dialog:options:sclick:156: { .run http://infobloot.icenetwork.co.uk }
on *:dialog:options:sclick:157: {
if ($exists(%ifbdir $+ \ $+ ifbtutorial.txt) == $true) { .run %ifbdir $+ \ $+ ifbtutorial.txt }
else {
if ($dialog(msgbox).title == $null) { set %msgboxtitle Error | set %msgboxbuttons ok | set %msgboxmsg Cannot Locate The InfoBloot Tutorial. | dialog -am msgbox msgbox | return }
}
}
on *:dialog:options:sclick:147: { did -e $dname 149,206 }
on *:dialog:options:sclick:152: { did -e $dname 153,207 }
on *:dialog:options:sclick:149: {
if ($did($dname,147).sel == $null) || ($did($dname,147).sel == <Select An Addon>) { return }
.unload -rs %ifbdir $+ \addons\ $+ $did($dname,147,$did($dname,147).sel) $+ .ifb
write -ds $+ $did($dname,147,$did($dname,111).sel) %ifbdir $+ \addons\loaded-addons.txt
did -d $dname 147 $did($dname,147).sel
did -i $dname 147 0 <Select An Addon>
did -b $dname 149,206
}
on *:dialog:options:sclick:153: {
if ($did($dname,152).sel == $null) || ($did($dname,152).sel == <Select An Addon>) { return }
var %addonchecklines = $lines(%ifbdir $+ \addons\ $+ $did($dname,152,$did($dname,152).sel) $+ .ifb), %addoncheckedlines = 0
while (%addoncheckedlines < %addonchecklines) {
if ($did($dname,152,$did($dname,152).sel) == $read(%ifbdir $+ \addons\loaded-addons.txt,%addoncheckedlines)) {
if ($dialog(msgbox).title == $null) { set %msgboxtitle Error | set %msgboxbuttons ok | set %msgboxmsg Addon Already Loaded. | dialog -am msgbox msgbox | return }
}
inc %addoncheckedlines 1
}
.load -rs %ifbdir $+ \addons\ $+ $did($dname,152,$did($dname,152).sel) $+ .ifb
write %ifbdir $+ \addons\loaded-addons.txt $did($dname,152,$did($dname,152).sel)
did -a $dname 147 $did($dname,152,$did($dname,152).sel)
}
on *:dialog:options:sclick:24: {
if ($did($dname,24).state == 1) { did -c $dname 174 }
else { did -u $dname 174 }
}
on *:dialog:options:sclick:174: {
if ($did($dname,174).state == 1) { did -c $dname 24 }
else { did -u $dname 24 }
}
on *:dialog:options:sclick:206: {
if ($read(%ifbdir $+ \addons\ $+ $did(options,147,$did($dname,147).sel) $+ .ifb,s,;.begin) != $null) {
var %ifbaddonreadn = $readn
set %addon_name $right($read(%ifbdir $+ \addons\ $+ $did(options,147,$did($dname,147).sel) $+ .ifb,$calc(%ifbaddonreadn + 1)),$calc($len($read(%ifbdir $+ \addons\ $+ $did(options,147,$did($dname,147).sel) $+ ifb,$calc(%ifbaddonreadn + 1))) - 2))
set %addon_version $right($read(%ifbdir $+ \addons\ $+ $did(options,147,$did($dname,147).sel) $+ .ifb,$calc(%ifbaddonreadn + 2)),$calc($len($read(%ifbdir $+ \addons\ $+ $did(options,147,$did($dname,147).sel) $+ ifb,$calc(%ifbaddonreadn + 2))) - 2))
set %addon_author $right($read(%ifbdir $+ \addons\ $+ $did(options,147,$did($dname,147).sel) $+ .ifb,$calc(%ifbaddonreadn + 3)),$calc($len($read(%ifbdir $+ \addons\ $+ $did(options,147,$did($dname,147).sel) $+ ifb,$calc(%ifbaddonreadn + 3))) - 2))
set %addon_email $right($read(%ifbdir $+ \addons\ $+ $did(options,147,$did($dname,147).sel) $+ .ifb,$calc(%ifbaddonreadn + 4)),$calc($len($read(%ifbdir $+ \addons\ $+ $did(options,147,$did($dname,147).sel) $+ ifb,$calc(%ifbaddonreadn + 4))) - 2))
set %addon_website $right($read(%ifbdir $+ \addons\ $+ $did(options,147,$did($dname,147).sel) $+ .ifb,$calc(%ifbaddonreadn + 5)),$calc($len($read(%ifbdir $+ \addons\ $+ $did(options,147,$did($dname,147).sel) $+ ifb,$calc(%ifbaddonreadn + 5))) - 2))
set %addon_notes $right($read(%ifbdir $+ \addons\ $+ $did(options,147,$did($dname,147).sel) $+ .ifb,$calc(%ifbaddonreadn + 6)),$calc($len($read(%ifbdir $+ \addons\ $+ $did(options,147,$did($dname,147).sel) $+ ifb,$calc(%ifbaddonreadn + 6))) - 2))
dialog -am addons addons
}
else { did -i $dname 147 0 <Error In Addon> | did -b $dname 149,206 }
}
on *:dialog:options:sclick:207: {
if ($read(%ifbdir $+ \addons\ $+ $did(options,152,$did($dname,152).sel) $+ .ifb,s,;.begin) != $null) {
var %ifbaddonreadn = $readn
set %addon_name $right($read(%ifbdir $+ \addons\ $+ $did(options,152,$did($dname,152).sel) $+ .ifb,$calc(%ifbaddonreadn + 1)),$calc($len($read(%ifbdir $+ \addons\ $+ $did(options,152,$did($dname,152).sel) $+ ifb,$calc(%ifbaddonreadn + 1))) - 2))
set %addon_version $right($read(%ifbdir $+ \addons\ $+ $did(options,152,$did($dname,152).sel) $+ .ifb,$calc(%ifbaddonreadn + 2)),$calc($len($read(%ifbdir $+ \addons\ $+ $did(options,152,$did($dname,152).sel) $+ ifb,$calc(%ifbaddonreadn + 2))) - 2))
set %addon_author $right($read(%ifbdir $+ \addons\ $+ $did(options,152,$did($dname,152).sel) $+ .ifb,$calc(%ifbaddonreadn + 3)),$calc($len($read(%ifbdir $+ \addons\ $+ $did(options,152,$did($dname,152).sel) $+ ifb,$calc(%ifbaddonreadn + 3))) - 2))
set %addon_email $right($read(%ifbdir $+ \addons\ $+ $did(options,152,$did($dname,152).sel) $+ .ifb,$calc(%ifbaddonreadn + 4)),$calc($len($read(%ifbdir $+ \addons\ $+ $did(options,152,$did($dname,152).sel) $+ ifb,$calc(%ifbaddonreadn + 4))) - 2))
set %addon_website $right($read(%ifbdir $+ \addons\ $+ $did(options,152,$did($dname,152).sel) $+ .ifb,$calc(%ifbaddonreadn + 5)),$calc($len($read(%ifbdir $+ \addons\ $+ $did(options,152,$did($dname,152).sel) $+ ifb,$calc(%ifbaddonreadn + 5))) - 2))
set %addon_notes $right($read(%ifbdir $+ \addons\ $+ $did(options,152,$did($dname,152).sel) $+ .ifb,$calc(%ifbaddonreadn + 6)),$calc($len($read(%ifbdir $+ \addons\ $+ $did(options,152,$did($dname,152).sel) $+ ifb,$calc(%ifbaddonreadn + 6))) - 2))
dialog -am addons addons
}
else { did -i $dname 152 0 <Error In Addon> | did -b $dname 153,207 }
}
on *:dialog:options:sclick:200: {
if (($did(options,200,$did($dname,200).sel) != $null) && ($did($dname,200,$did($dname,200).sel) != <Select>)) { did -r $dname 203 | did -o $dname 203 1 $readini(%ifbdir $+ \ $+ %ifbhelpfile,topics,$did($dname,200,$did($dname,200).sel)) }
}
on *:dialog:options:sclick:201: {
if (($did($dname,200,$did($dname,200).sel) != $null) && ($did($dname,200,$did($dname,200).sel) != <Select>) && ($did($dname,203).text != $null)) {
var %ifbhelplines = 1
while (%ifbhelplines <= $did($dname,203).lines) {
var %ifbhelpwrite = %ifbhelpwrite $did($dname,203,%ifbhelplines).text
inc %ifbhelplines 1
}
writeini -n %ifbdir $+ \ $+ %ifbhelpfile topics $did($dname,200,$did($dname,200).sel) %ifbhelpwrite
}
else {
if (($did($dname,200).text != $null) && ($did($dname,200).text != <Select>) && ($did($dname,203).text != $null)) {
var %ifbhelplines = 1
while (%ifbhelplines <= $did($dname,203).lines) {
var %ifbhelpwrite = %ifbhelpwrite $did($dname,203,%ifbhelplines).text
inc %ifbhelplines 1
}
writeini -n %ifbdir $+ \ $+ %ifbhelpfile topics $did($dname,200).text %ifbhelpwrite
did -a $dname 200 $did($dname,200).text
}
}
}
on *:dialog:options:sclick:202: {
if (($did($dname,200).text != $null) && ($did($dname,200).text != <Select>)) {
remini -n %ifbdir $+ \ $+ %ifbhelpfile topics $did($dname,200,$did($dname,200).sel)
did -d $dname 200 $did($dname,200).sel
did -o $dname 200 0 <Select>
did -r $dname 203
}
}
on *:dialog:options:close:*: {
unset %ifbsetnumbertemp
if ($sock(ifbupdate).name != $null) { .sockclose ifbupdate }
if ($sock(ifbnews).name != $null) { .sockclose ifbnews }
}
dialog uninstall {
title "// Uninstall \\"
size -1 -1 204 124
option pixels
text "Thankyou for using InfoBloot.", 1, 20 1 159 14, center
text "Please feel free to report back any feedback using the form on the InfoBloot website, or by emailing me at: iceshaman@icenetwork.co.uk", 2, 18 20 178 61
button "Uninstall", 3, 21 76 75 25
button "Cancel", 4, 107 76 75 25, cancel
link "Click to visit InfoBloot website", 5, 30 106 143 16
}
on *:dialog:uninstall:sclick:3: { set %ifbuninstall true | dialog -x $dname | ifbuninstall }
on *:dialog:uninstall:sclick:5: { .run http://infobloot.icenetwork.co.uk }
;Error message box code
dialog -l msgbox {
title [ %msgboxtitle ]
size -1 -1 166 43
option dbu
text [ %msgboxmsg ], 1, 3 2 160 25, center
button "Ok", 2, 62 29 37 12, cancel
button "Yes", 3, 42 29 37 12, ok
button "No", 4, 81 29 37 12
}
on *:dialog:msgbox:init:*: {
if (yes/no isin %msgboxbuttons) { did -hb $dname 2 | did -ve $dname 3,4 | unset %msgboxtitle | unset %msgboxmsg | unset %msgboxbuttons | return }
else { did -hb $dname 3,4 | did -ve $dname 2 | unset %msgboxtitle | unset %msgboxmsg | unset %msgboxbuttons | return }
}
on *:dialog:msgbox:sclick:2: { dialog -v options }
on *:dialog:msgbox:sclick:3: { set %msgboxinput yes | dialog -v options }
on *:dialog:msgbox:sclick:4: { dialog -x msgbox | dialog -v options }
;Addons dialog
dialog addons {
title "// InfoBloot Addon Info \\"
size -1 -1 140 125
option dbu
text "Addon:", 1, 8 9 130 8
text [ %addon_name ], 2, 30 9 130 8
text "Version:", 3, 6 20 130 8
text [ %addon_version ], 4, 30 20 130 8
text "Author:", 5, 7 31 130 8
text [ %addon_author ], 6, 30 31 130 8
text "Email:", 7, 12 42 130 8
text [ %addon_email ], 8, 30 42 130 8
text "Website:", 9, 4 53 130 8
text [ %addon_website ], 10, 30 53 130 8
text "Notes:", 11, 9 63 17 8
edit [ %addon_notes ], 12, 29 64 108 42, read multi vsbar
button "Close", 13, 29 109 37 12, flat cancel
}
on *:dialog:addons:init:*: {
unset %addon_name
unset %addon_version
unset %addon_author
unset %addon_email
unset %addon_website
unset %addon_notes
}
;Addon menu adder/deleter/viewer, used by addon scripts only.
alias ifbaddaddonmenu {
writeini -n %ifbdir $+ \addons\addon-menus.ini menus $$1 true
}
alias ifbdeladdonmenu {
remini -n %ifbdir $+ \addons\addon-menus.ini menus $$1
}
alias -l ifblistaddonmenu {
if ($1 == begin) { return }
if ($1 == end) { return }
while ($1 <= $ini(%ifbdir $+ \addons\addon-menus.ini,menus,0)) {
return . $+ $ini(%ifbdir $+ \addons\addon-menus.ini,menus,$1) $+ : { dialog -m ifbaddon_ $+ $ini(%ifbdir $+ \addons\addon-menus.ini,menus,$1) ifbaddon_ $+ $ini(%ifbdir $+ \addons\addon-menus.ini,menus,$1) }
}
}
;Here is the socketry for retrieving news, version status e.t.c
on *:SOCKOPEN:ifbnews:{
if ($sockerr) { did -r options 145 | did -o options 145 1 Error connecting to server | return }
.sockwrite -n ifbnews GET /news/news.php HTTP/0.9
.sockwrite -n ifbnews Host: infobloot.icenetwork.co.uk
.sockwrite -n ifbnews
did -r options 145
did -o options 145 1 Please Wait...
}
on *:SOCKREAD:ifbnews:{
if ($sockerr) { did -r options 145 | did -o options 145 1 Error reading news data | return }
var %newsdata
:ifbnewsagain
sockread -n %newsdata
if ($sockbr) {
if ($sock(ifbnews).mark) {
if (%ifbnewsdelfile == $null) { write -c %ifbdir $+ \ $+ news.ifb | var %ifbnewsdelfile = no | goto ifbnewsagain }
else { ifb_savenews %newsdata }
}
elseif (HTTP/* iswm $gettok(%newsdata,1,32)) {
if ($gettok(%newsdata,2,32) !isnum 200-299) { echo -a Error from server: $gettok(%newsdata,3-,32) }
}
elseif (%newsdata == $null) sockmark ifbnews 1
goto ifbnewsagain
}
:ifbnewsend
}
on *:SOCKCLOSE:ifbnews: {
if ($dialog(options).title != $null) {
did -r options 145
if ($exists(%ifbdir $+ \ $+ news.ifb)) { loadbuf -o options 145 %ifbdir $+ \ $+ news.ifb }
else { did -o options 145 1 Error loading news... }
}
else { return }
}
alias -l ifb_savenews {
write -a %ifbdir $+ \ $+ news.ifb $replace($1-,<b>,[,</b>,],<br>,$&,<,<,>,>)
}
on *:SOCKOPEN:ifbupdate:{
if ($sockerr) { echo -a Could not connect... | return }
.sockwrite -n ifbupdate GET /version/ifbversion.txt HTTP/0.9
.sockwrite -n ifbupdate Host: infobloot.icenetwork.co.uk
.sockwrite -n ifbupdate
}
on *:SOCKREAD:ifbupdate:{
if ($sockerr) {
if (%ifbremotecheck != $null) { msg %ifbremotechan Error reading data from socket | return }
else { echo -a Error reading data from socket | return }
}
var %data
:again
sockread -n %data
if ($sockbr) {
if ($sock(ifbupdate).mark) {
if ((%data > %ifbversion) && (%ifbremotecheck != $null)) {
msg %ifbremotechan New version of InfoBloot available: Current: %ifbversion Latest: %data
unset %ifbremotecheck
unset %ifbremotechan
return
}
if (%data > %ifbversion) {
echo -a 1,9*** New version of InfoBloot available: Current: 1,4 %ifbversion 1,9 Latest: 1,4 %data 1,9 ***
if ($dialog(options).title != $null) { did -o options 73 1 Current Version: %ifbversion | did -o options 74 1 Latest version: %data }
return
}
elseif (%ifbremotecheck != $null) {
msg %ifbremotechan No Updates Available
unset %ifbremotecheck
unset %ifbremotechan
return
}
else {
did -o options 73 1 Current Version: %ifbversion
did -o options 74 1 This is the latest version.
return
}
}
elseif (HTTP/* iswm $gettok(%data,1,32)) {
if ($gettok(%data,2,32) !isnum 200-299) {
if (%ifbremotecheck != $null) { msg %ifbremotechan Error from server: $gettok(%data,3-,32) | return }
else { echo -a Error from server: $gettok(%data,3-,32) }
}
}
elseif (%data == $null) sockmark ifbupdate 1
goto again
}
}
alias ifbnews_write { write -a news.ifb $1- }
;Here lies the end of the script for now....if you find any bugs are things that can be achieved
;more eaily...why not e-mail and tell me iceshaman@icenetwork.co.uk
;If you do I can add the functions you want added! Probably as an addon but maybe hardcoded!
;Remember if you see a cool function and you want to use it as your own tell me first :p
;Peace all and enjoy the script...
========================================================================================================
EOF
========================================================================================================