this mod is for Channel Guardian Socket Bot the mod is called alice.mod i dont know why its not working any more .. the website is still running with the same port can anyone fix it please ? thank you
alias alice {
var %a = $+(alice.,$r(1,99999999999999999999))
sockopen %a www.andreasroom.com 81
sockmark %a $1 $2 $iif($3,$remove($strip($iif($3 == Alice,$4-,$3-)),$chr(40),$chr(41),$chr(91),$chr(93),@,+,~,&,%,:,$chr(44)),INACTIVITY)
}
alias -l striphtml {
var %p = 1, %b = $replace($mid($1-,1,420),$chr(38),$+($chr(32),$chr(38)),;,$+(;,$chr(32)),>,$+(>,$chr(32)),<,$+($chr(32),<,)), %c
while ($gettok(%b,%p,32)) {
%c = $ifmatch
if (< iswm %c || &; iswm %c || </ iswm %c || solid iswm %c || px iswm %c || : iswm %c && $remove(%c,:) !isnum || / iswm %c || ' iswm %c || ; iswm %c || & iswm %c || <> iswm %c || = iswm %c || " iswm %c || > iswm %c || $+(,$chr(40),) iswm %c || $+(,$chr(41),) iswm %c || $+(,$chr(123),) iswm %c || $+(,$chr(125),*) iswm %c) { %b = $remove(%b,%c) | %p = 0 }
inc %p
}
return %b
}
alias -l privmsgalice {
if ($hget($+($1,.,$hget(cgsb,$+($1,.network)),.,$2,.nicks),$3)) {
var %t = $gettok($hget(cgsb,$+($1,.colors)),1,32), %u = $gettok($hget(cgsb,$+($1,.colors)),2,32)
sockwrite -n $1 privmsg $2 $+(:,$iif(%u || %t,$+($chr(3),%t,$chr(44),%u,$chr(32)))) $+ $4- $chr(3)
}
}
alias -l cgsbsock { return $hget(cgsb,socket) | halt }
;============================== EVENTS
on :signal:alice:{
var %z = $hget(cgsb,buffer), %p = $hget(cgsb,$+($cgsbsock,.prefix))
var %t = $gettok($hget(cgsb,$+($cgsbsock,.colors)),1,32), %u = $gettok($hget(cgsb,$+($cgsbsock,.colors)),2,32)
var %a = $hget($cgsbsock,access)
tokenize 32 $remove(%z,$chr(124))
if ($2 == privmsg && $left($3,1) == $chr(35)) {
if ($istok($strip($remove($mid($4-,2,$len($4-)),!,$chr(44),?,:)),$hget(cgsb,$+($cgsbsock,.nick)),32)) {
hadd $cgsbsock $+($gettok($mid($1,2,$len($1)),1,33),.alicechannel) $3
hadd $cgsbsock $+($gettok($mid($1,2,$len($1)),1,33),.alicenick) $gettok($mid($1,2,$len($1)),1,33)
.timer $+ $3 $+ $gettok($mid($1,2,$len($1)),1,33) $+ alicebot -o 1 1 alice $cgsbsock $gettok($mid($1,2,$len($1)),1,33) $replace($remove($strip($mid($4-,2,$len($4-))),$chr(40),$chr(41),$chr(91),$chr(93),$chr(44),~,&,%,@,+),$hget(cgsb,$+($cgsbsock,.nick)),Alice)
if ($r(1,10) isnum 8-10 && $r(1,5) isnum 1-2) { .timer $+ $3 $+ $gettok($mid($1,2,$len($1)),1,33) $+ alice -o 1 $r(30,220) alice $cgsbsock $gettok($mid($1,2,$len($1)),1,33) INACTIVITY }
}
else {
if ($+(:,%p,addai) == $4) {
if (%a < $getcom(addai)) { sockwrite -n $cgsbsock notice $gettok($mid($1,2,$len($1)),1,33) $+(:,$iif(%u || %t,$+($chr(3),%t,$chr(44),%u,$chr(32)))) $+ You do not posses enough access for this command. $chr(3) }
elseif (!$5 || !$6) { sockwrite -n $cgsbsock notice $gettok($mid($1,2,$len($1)),1,33) $+(:,$iif(%u || %t,$+($chr(3),%t,$chr(44),%u,$chr(32)))) $+ No catagory/text specified. $chr(3) }
else { hadd -m alice $5- | sockwrite -n $cgsbsock notice $gettok($mid($1,2,$len($1)),1,33) $+(:,$iif(%u || %t,$+($chr(3),%t,$chr(44),%u,$chr(32)))) $+ Successfully added catagory: $5 with text: $6- $+ . $chr(3) }
}
elseif ($+(:,%p,delai) == $4) {
if (%a < $getcom(delai)) { sockwrite -n $cgsbsock notice $gettok($mid($1,2,$len($1)),1,33) $+(:,$iif(%u || %t,$+($chr(3),%t,$chr(44),%u,$chr(32)))) $+ You do not posses enough access for this command. $chr(3) }
elseif (!$5) { sockwrite -n $cgsbsock notice $gettok($mid($1,2,$len($1)),1,33) $+(:,$iif(%u || %t,$+($chr(3),%t,$chr(44),%u,$chr(32)))) $+ No catagory specified. $chr(3) }
elseif (!$hfind(alice,$5,1,w).item) { sockwrite -n $cgsbsock notice $gettok($mid($1,2,$len($1)),1,33) $+(:,$iif(%u || %t,$+($chr(3),%t,$chr(44),%u,$chr(32)))) $+ No such catagory found! }
else { var %x = 0 | while ($hfind(alice,$5,1,w).item) { inc %x | hdel alice $ifmatch } | sockwrite -n $cgsbsock notice $gettok($mid($1,2,$len($1)),1,33) $+(:,$iif(%u || %t,$+($chr(3),%t,$chr(44),%u,$chr(32)))) $+ Successfully deleted %x $+ $iif(%x == 1,catagory.,catagories.) $chr(3) }
}
else {
var %x = $hfind(alice,$+(,$replace($mid($4-,2,$len($4-)),$chr(32),),),1,W).item
if (%x) { sockwrite -n $cgsbsock privmsg $3 : $+ $gettok($mid($1,2,$len($1)),1,33) $+ : $hget(alice,%x) }
}
}
}
elseif ($2 == PART) {
if ($gettok($mid($1,2,$len($1)),1,33) != $hget(cgsb,$+($cgsbsock,.nick))) {
.timer $+ $3 $+ $gettok($mid($1,2,$len($1)),1,33) $+ alice off
}
}
elseif ($2 == KICK) {
if ($4 != $hget(cgsb,$+($cgsbsock,.nick))) {
.timer $+ $3 $+ $4 $+ alice off
}
}
elseif ($2 == QUIT) {
var %a = 1, %b = $hget(cgsb,$+($cgsbsock,.channels)), %c, %nick = $gettok($mid($1,2,$len($1)),1,33)
while ($gettok(%b,%a,32)) {
%c = $mid($ifmatch,$pos($ifmatch,$chr(35)),$len($ifmatch))
if ($hget($+($cgsbsock,.,$hget(cgsb,$+($cgsbsock,.network)),.,%c,.nicks),%nick)) {
.timer $+ %c $+ %nick $+ alice off
}
inc %a
}
}
}
on :sockopen:alice.:{
var %t = $gettok($hget(cgsb,$+($sockname,.colors)),1,32), %u = $gettok($hget(cgsb,$+($sockname,.colors)),2,32)
if ($sockerr > 0) { sockwrite -n $gettok($sock($sockname).mark,1,32) privmsg $hget($gettok($sock($sockname).mark,1,32),$+($gettok($sock($sockname).mark,2,32),.alicechannel)) $+(:,$iif(%u && %t,$+($chr(3),%t,$chr(44),%u,$chr(32)))) $+ $+($hget($gettok($sock($sockname).mark,1,32),$+($gettok($sock($sockname).mark,2,32),.alicenick)),:) I do not know. $chr(3) | return }
sockwrite -n $sockname GET $+(/?text=,$replace($gettok($sock($sockname).mark,3-,32),$chr(32),$+($chr(37),20))) HTTP/1.1 $crlf
sockwrite -n $sockname Accept: / $crlf
sockwrite -n $sockname Referer: localhost $crlf
sockwrite -n $sockname Accept-Language: en-us $crlf
sockwrite -n $sockname User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) $crlf
sockwrite -n $sockname Connection: Keep-Alive $crlf
sockwrite -n $sockname Host: $+(localhost,$str($crlf, 2))
}
on :sockread:alice.:{
var %t = $gettok($hget(cgsb,$+($sockname,.colors)),1,32), %u = $gettok($hget(cgsb,$+($sockname,.colors)),2,32)
if ($sockerr > 0) { sockwrite -n $gettok($sock($sockname).mark,1,32) privmsg $hget($gettok($sock($sockname).mark,1,32),$+($gettok($sock($sockname).mark,2,32),.alicechannel)) $+(:,$iif(%u && %t,$+($chr(3),%t,$chr(44),%u,$chr(32)))) $+ $+($hget($gettok($sock($sockname).mark,1,32),$+($gettok($sock($sockname).mark,2,32),.alicenick)),:) I do not know. $chr(3) | return }
var %x, %found
sockread %x
var %nick = $hget($gettok($sock($sockname).mark,1,32),$+($gettok($sock($sockname).mark,2,32),.alicenick))
%nick = $hget($gettok($sock($sockname).mark,1,32),$+(%nick,.alice))
%x = $iif(%nick,$replace(%x,user,%nick),%x)
tokenize 32 $gettok($mid(%x,1,420),1,9)
if ( iswm $1-) { [ %found [ $+ [ $sockname ] ] ] = Y }
if ([ %found [ $+ [ $sockname ] ] ] == Y && < !iswm $1-) {
if ($1 != 0 && $1) { hadd $gettok($sock($sockname).mark,1,32) $+($sockname,.prevalice) $1- }
if (($1- == 0) || (why iswm $gettok($sock($sockname).mark,3-,32)) || (when iswm $gettok($sock($sockname).mark,3-,32)) || (what are iswm $gettok($sock($sockname).mark,3-,32)) || (whats isin $remove($gettok($sock($sockname).mark,3-,32),') && your name !iswm $gettok($sock($sockname).mark,3-,32) && my name !iswm $gettok($sock($sockname).mark,3-,32) && up !iswm $gettok($sock($sockname).mark,3-,32) && new !iswm $gettok($sock($sockname).mark,3-,32)) || (what is iswm $gettok($sock($sockname).mark,3-,32) && your name !iswm $gettok($sock($sockname).mark,3-,32) && my name !iswm $gettok($sock($sockname).mark,3-,32) && up !iswm $gettok($sock($sockname).mark,3-,32)) || (where is iswm $gettok($sock($sockname).mark,3-,32)) || (who iswm $gettok($sock($sockname).mark,3-,32)) || (where are iswm $gettok($sock($sockname).mark,3-,32) && where are you !iswm $gettok($sock($sockname).mark,3-,32))) {
hadd $gettok($sock($sockname).mark,1,32) $+($sockname,.answersnick) $hget($gettok($sock($sockname).mark,1,32),$+($gettok($sock($sockname).mark,2,32),.alicenick))
hadd $gettok($sock($sockname).mark,1,32) $+($sockname,.answerschannel) $hget($gettok($sock($sockname).mark,1,32),$+($gettok($sock($sockname).mark,2,32),.alicechannel))
var %txt = $remove($strip($gettok($sock($sockname).mark,3-,32)),$hget(cgsb,$+($gettok($sock($sockname).mark,1,32),.nick)),~,&,@,%,+,$chr(40),$chr(41),$chr(91),$chr(93))
answers $gettok($sock($sockname).mark,1,32) $sockname $remove(%txt,Alice)
}
elseif ((i am in !iswm $gettok($sock($sockname).mark,3-,32) && i am iswm $remove($gettok($sock($sockname).mark,3-,32),Alice) && i am a !iswm $gettok($sock($sockname).mark,3-,32) && now i am !iswm $gettok($sock($sockname).mark,3-,32)) || (im iswm $gettok($sock($sockname).mark,3-,32)) || (my name is iswm $gettok($sock($sockname).mark,3-,32) && my name isnt !iswm $gettok($sock($sockname).mark,3-,32) && what do you !iswm $gettok($sock($sockname).mark,3-,32))) {
var %nick = $hget(cgsb,$+($gettok($sock($sockname).mark,1,32),.nick))
var %rem = $remove($strip($gettok($sock($sockname).mark,3-,32)),@,+,~,&,%,.,$chr(44),!,?,$chr(40),$chr(41),$chr(91),$chr(93),:,%nick)
var %f = $gettok(%rem,$numtok(%rem,32),32)
if ($hget($gettok($sock($sockname).mark,1,32), $+($hget($gettok($sock($sockname).mark,1,32),$+($gettok($sock($sockname).mark,2,32),.alicenick)),.alice) ) == %f) { sockwrite -n $gettok($sock($sockname).mark,1,32) privmsg $hget($gettok($sock($sockname).mark,1,32),$+($gettok($sock($sockname).mark,2,32),.alicechannel)) $+(:,$iif(%u || %t,$+($chr(3),%t,$chr(44),%u,$chr(32)))) $+ $+($hget($gettok($sock($sockname).mark,1,32),$+($gettok($sock($sockname).mark,2,32),.alicenick)),:) I already knew your name was that. $chr(3) }
else { hadd $gettok($sock($sockname).mark,1,32) $+($hget($gettok($sock($sockname).mark,1,32),$+($gettok($sock($sockname).mark,2,32),.alicenick)),.alice) %f | sockwrite -n $gettok($sock($sockname).mark,1,32) privmsg $hget($gettok($sock($sockname).mark,1,32),$+($gettok($sock($sockname).mark,2,32),.alicechannel)) $+(:,$iif(%u || %t,$+($chr(3),%t,$chr(44),%u,$chr(32)))) $+ $+($hget($gettok($sock($sockname).mark,1,32),$+($gettok($sock($sockname).mark,2,32),.alicenick)),:) Nice to meet you, %f $+ . $chr(3) }
}
else {
sockwrite -n $gettok($sock($sockname).mark,1,32) privmsg $hget($gettok($sock($sockname).mark,1,32),$+($gettok($sock($sockname).mark,2,32),.alicechannel)) $+(:,$iif(%u && %t,$+($chr(3),%t,$chr(44),%u,$chr(32)))) $+ $iif($gettok($sock($sockname).mark,3,32) != CONNECT,$+($hget($gettok($sock($sockname).mark,1,32),$+($gettok($sock($sockname).mark,2,32),.alicenick)),:,$chr(32))) $+ $replace($1-,inactivity,nothing,Alice,$hget(cgsb,$+($gettok($sock($sockname).mark,1,32),.nick)))
}
unset %found $+ $sockname
}
}
;============================================================================== ASK BIT
alias -l answers {
var %a = $+(answers.,$r(1,999999999999999999))
sockclose %a
sockopen %a wiki.answers.com 80
sockmark %a $1-
}
alias -l destroyanswers {
if (!$2) { return }
hdel $1 $+($2,.answersword)
hdel $1 $+($2,.answerschannel)
hdel $1 $+($2,.answersnick)
hdel $1 $+($2,.answersword)
hdel $1 $+($2,.prevalice)
unset %answer $+ $2
unset %found $+ $2
unset %loc $+ $2
}
alias -l striphtml {
var %p = 1, %b = $replace($mid($1-,1,420),$chr(38),$+($chr(32),$chr(38)),;,$+(;,$chr(32)),>,$+(>,$chr(32)),<,$+($chr(32),<,)), %c
while ($gettok(%b,%p,32)) {
%c = $ifmatch
if (< iswm %c || &; iswm %c || </ iswm %c || solid iswm %c || px iswm %c || : iswm %c && $remove(%c,:) !isnum || / iswm %c || ' iswm %c || ; iswm %c || & iswm %c || <> iswm %c || = iswm %c || " iswm %c || > iswm %c || $+(,$chr(40),) iswm %c || $+(,$chr(41),) iswm %c || $+(,$chr(123),) iswm %c || $+(,$chr(125),*) iswm %c) { %b = $remove(%b,%c) | %p = 0 }
inc %p
}
return %b
}
;============================== EVENTS
on :sockopen:answers.:{
var %t = $gettok($hget(cgsb,$+($sockname,.colors)),1,32), %u = $gettok($hget(cgsb,$+($sockname,.colors)),2,32)
if ($sockerr > 0) { sockwrite -n $gettok($sock($sockname).mark,1,32) privmsg $hget($gettok($sock($sockname).mark,1,32),$+($gettok($sock($sockname).mark,2,32),.answerschannel)) $+(:,$iif(%u || %t,$+($chr(3),%t,$chr(44),%u,$chr(32)))) $+ $+($hget($gettok($sock($sockname).mark,1,32),$+($gettok($sock($sockname).mark,2,32),.answersnick)),:) I do not know. $chr(3) | return }
sockwrite -n $sockname GET $+(/wiki.phtml?alreadyAsked=1&title=,$remove($replace($gettok($sock($sockname).mark,3-,32),$chr(32),_),?)) HTTP/1.1 $+ $crlf
sockwrite -n $sockname Host: wiki.answers.com $+ $crlf
sockwrite -n $sockname Connection: close $+ $crlf
sockwrite -n $sockname Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint, / $+ $crlf
sockwrite -n $sockname Accept-Language: en-us $+ $crlf
sockwrite -n $sockname User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727) Web-Sniffer/1.0.24 $+ $crlf
sockwrite -n $sockname Referer: http://web-sniffer.net/ $+ $crlf $+ $crlf
}
on :sockread:answers.:{
var %t = $gettok($hget(cgsb,$+($sockname,.colors)),1,32), %u = $gettok($hget(cgsb,$+($sockname,.colors)),2,32)
if ($sockerr > 0) { sockwrite -n $gettok($sock($sockname).mark,1,32) privmsg $hget($gettok($sock($sockname).mark,1,32),$+($gettok($sock($sockname).mark,2,32),.answerschannel)) $+(:,$iif(%u || %t,$+($chr(3),%t,$chr(44),%u,$chr(32)))) $+ $+($hget($oettok($sock($sockname).mark,1,32),$+($gettok($sock($sockname).mark,2,32),.answersnick)),:) I do not know. $chr(3) | return }
var %a, %b
var %prev = $hget($gettok($sock($sockname).mark,1,32),$+($gettok($sock($sockname).mark,2,32),.prevalice))
sockread -f %a
%a = $mid(%a,1,420)
%a = $gettok(%a,1,9)
tokenize 32 %a
if (Location: iswm $1- && [ !%loc [ $+ [ $gettok($sock($sockname).mark,2,32) ] ] ]) { [ %loc [ $+ [ $gettok($sock($sockname).mark,2,32) ] ] ] = YES | answers $gettok($sock($sockname).mark,1-2,32) $gettok($gettok($gettok($2,2,$asc(?)),1,$asc(&)),2,$asc(=)) | sockclose $sockname | return }
if (