[Aliases] n0=/op /mode # +ooo $$1 $2 $3 n1=/dop /mode # -ooo $$1 $2 $3 n2=/j /join #$$1 n3=/p /part # n4=/n /names #$$1 n5=/w /whois $$1 n6=/k /kick # $$1 n7=/q /query $$1 n8=/hop /part # | /join #$$1 n9=/send /dcc send $1 $2 n10=/chat /dcc chat $1 n11=/ping /ctcp $$1 ping n12=============================| Function keys -- n13=/f1 /spawn | set %counter 1 n14=/sf1 set %sec true | f1 n15=/f2 /respawn | set %counter 1 n16=/sf2 /rlink $??="Enter LinkBot you wish to share network with:" n17=/sf3 /rcon n18=/sf4 { n19= if ((# isin $active) || (%error3 isin $active) || (Status $+ $chr(160) $+ Window isin $active)) { n20= echo Error - this command is to you be used on open DCC windows. Please select one and try again, or hit F1 to spawn a clone. n21= halt n22= } n23= set %tmp $??="Terminate Acrive Session? y/n" n24= if (y !isin %tmp) { n25= echo Excellent! n26= unset %tmp n27= halt n28= } n29= msg = $+ $nick RLINK CLOSE n30= write -ds $+ $nick info.txt n31= reflist n32= set %broadstring  Closed link to remote Channel Hub. n33= if (%mychan != $null) msg %mychan %broadstring n34= send2all n35= close -c $nick n36=} n37=/f3 /broadcast n38=/f4 { n39= .timer 1 5 report n40= update n41=} n42=/f5 { n43= if ((# isin $active) || (%error3 isin $active) || (Status $+ $chr(160) $+ Window isin $active)) { n44= echo Error - this command is to you be used on DCC windows. Please select one and try again, or hit F1 to spawn a clone. n45= halt n46= } n47= set %tmpline $read -s $+ $nick info.txt n48= if ( $gettok(%tmpline,2,126) != $null) { n49= echo Only one channel at a time, please. n50= halt n51= } n52= msg = $+ $nick JOIN $$?="Please enter a channel:" n53=} n54=/f6 { n55= if ((# isin $active) || (%error3 isin $active) || (Status $+ $chr(160) $+ Window isin $active)) { n56= echo Error - this command it to you be used on open DCC windows. Please select one and try again, or hit F1 to spawn a clone. n57= halt n58= } n59= set %tmpline $read -s $+ $nick info.txt n60= set %dontsend $nick n61= msg = $+ $nick PART $gettok(%tmpline,2,126) n62=} n63=/f7 { n64= if ((# isin $active) || (%error3 isin $active) || (Status $+ $chr(160) $+ Window isin $active)) { n65= echo Error - this command is to you be used on open DCC windows. Please select one and try again, or hit F1 to spawn a clone. n66= halt n67= } n68= set %tmp $??="Please enter channel to hop to:" n69= set %nick $remove($gettok($parm1,1,33),:) n70= set %tmpline $read -s $+ $nick info.txt n71= set %dontsend $nick n72= if (%tmp == $null) { n73= echo So why'd you change your mind? n74= halt n75= } n76= msg = $+ $nick PART $gettok(%tmpline,2,126) n77= timer 1 3 msg = $+ $nick JOIN %tmp n78=} n79=/f8 { n80= if ((# isin $active) || (%error3 isin $active) || (Status $+ $chr(160) $+ Window isin $active)) { n81= echo Error - this command is to you be used on open DCC windows. Please select one and try again, or hit F1 to spawn a clone. n82= halt n83= } n84= set %tmpline $read -s $+ $nick info.txt n85= set %tmp $??="Terminate active session? y/n" n86= if (y isin %tmp) { n87= msg = $+ $nick QUIT :LinkBot -- by [SB]Tikiman n88= secho Closed link to $gettok(%tmpline,2,126) on $gettok(%tmpline,1,126) n89= halt n90= } n91= echo Excellent! n92=} n93=/f9 { n94= if ((# isin $active) || (%error3 isin $active) || (Status $+ $chr(160) $+ Window isin $active)) { n95= echo Error - this command is to you be used on open DCC windows. Please select one and try again, or hit F1 to spawn a clone. n96= halt n97= } n98= if ($nick !isin %seclist) { n99= set %seclist %seclist $nick n100= echo Spy mode now -= ON =- n101= } n102= else { n103= set %seclist $remove(%seclist,$nick) n104= echo Spy mode now -= OFF =- n105= } n106=} n107=/f10 { n108= if ((# isin $active) || (%error3 isin $active) || (Status $+ $chr(160) $+ Window isin $active)) { n109= echo Error - this command is to you be used on open DCC windows. Please select one and try again, or hit F1 to spawn a clone. n110= halt n111= } n112= set %tmpline $read -s $+ $nick info.txt n113= if ($gettok(%tmpline,2,126) == $null) { n114= echo This Bot is currently not on a channel. n115= halt n116= } n117= msg = $+ $nick NAMES $gettok(%tmpline,2,126) n118= echo Information updated. n119=} n120=/f11 { n121= if ((# isin $active) || (%error3 isin $active) || (Status $+ $chr(160) $+ Window isin $active)) { n122= echo Error - this command is to you be used on open DCC windows. Please select one and try again, or hit F1 to spawn a clone. n123= halt n124= } n125= set %tmpline $read -s $+ $nick info.txt n126= echo $aquabold(=====================) n127= echo Bot Status n128= echo $aquabold(=====================) n129= echo Name : $nick n130= echo Server : $gettok(%tmpline,1,126) n131= echo Channel : $gettok(%tmpline,2,126) n132= echo Other Nicks Present: $gettok(%tmpline,3,126) n133= if ($nick isin %seclist) echo Spy Mode : -= ON =- n134= if ($nick !isin %seclist) echo Spy Mode : -= OFF =- n135= unset %tmpline n136=} n137=/f12 { n138= secho $aquabold(=====================) n139= secho Quick Help Guide: (F12) n140= secho $aquabold(=====================) n141= secho Commands for any window n142= secho $aquabold(=====================) n143= secho F1 : Spawn a clone (shift F1 spawns a spy clone) n144= secho F2 : Reconnect after 4 failed attempts n145= secho F3 : Send a broadcast message to all linked channels n146= secho F4 : Send a connection report to all linked channels n147= secho $aquabold(=====================) n148= secho Commands for DCC Clones n149= secho $aquabold(=====================) n150= secho F5 : Join a channel n151= secho F6 : Part currently active channel n152= secho F7 : Hop to a new channel n153= secho F8 : Close current DCC clone -- (Always Use This) n154= secho F9 : Toggle spy mode on/off n155= secho F10 : Refresh names list n156= secho F11 : Bot status report n157= secho F12 : This help menu n158= secho $aquabold(=====================) n159= secho Commands for Remote Links n160= secho $aquabold(=====================) n161= secho shift-F2 : Request a bot link n162= secho shift-F3 : Accept a bot link n163= secho shift-F4 : Close current bot link (Not on Clones) n164= secho $aquabold(=====================) n165=} n166=============================| Sub-Routines n167=/startup { n168= flush n169= set %botnick $me n170= write -c info.txt n171= .rlevel 10 n172= secho $redbold(==================================================) n173= secho $greenbold([==-------) Welcome to $aquabold(LinkBot), by $aquabold([SB]Tikiman) $greenbold(-------==]) n174= secho $redbold(==================================================) n175= secho Send questions/comments to $blue(bkennedy@haverford.edu) $+ . n176= secho Please join a channel to begin your session. n177= secho $redbold(==================================================) n178=} n179=/spawn { n180= set %server $$?="Enter remote server name:" n181= set %rnick $$?="Enter remote nickname:" n182= :loop n183= if (%rnick isin %nickchan) { n184= set %rnick $$?="Sorry, in use on local system. Please select another:" n185= goto loop n186= } n187= .auser 10 %rnick n188= set %rchannel $$?="Enter remote channel:" n189= secho $greenbold(==================================================) n190= if (%sec == true) { n191= set %seclist %seclist %rnick n192= secho Spawning clandestine clone to %rchannel on %server $+ . n193= } n194= if (%sec != true) { n195= secho Spawning link clone to %rchannel on %server $+ . n196= } n197= dns %server n198= nick %rnick n199=} n200=/respawn { n201= if ($me != %rnick) nick %rnick n202= .auser 10 %rnick n203= raw -q privmsg %rnick :DCC CHAT CHAT $longip(%ip) 6667 n204=} n205=/send2all { n206= set %sends $chat(0) n207= if (%broadstring != $null) goto loop n208= set %nick $remove($gettok($parm1,1,33),:) n209= set %tmp $len($parm4*) | dec %tmp n210= set %message $right(%tmp,$parm4*) n211= set %broadstring < $+ %nick $+ > %message n212= if (%mychan != $null) msg %mychan %broadstring n213= :loop n214= set %tmp1 $findtok(%nickchan,$chat(%sends),46) n215= inc %tmp1 n216= if ((($chat(%sends) != %dontsend) && ($chat(%sends) isin %nickchan)) && ($chat(%sends) !isin %seclist)) msg = $+ $chat(%sends) PRIVMSG $gettok(%nickchan,%tmp1,46) : $+ %broadstring n217= dec %sends n218= if (%sends > 0) goto loop n219= unset %broadstring | unset %dontsend | unset %sends | unset %tmp | unset %message n220=} n221=/update { n222= set %sends2 $chat(0) n223= names %mychan n224= :loop n225= set %tmp1 $findtok(%nickchan,$chat(%sends2),46) n226= inc %tmp1 n227= if (($chat(%sends2) != %dontsend) && ($chat(%sends2) isin %nickchan)) msg = $+ $chat(%sends2) NAMES $gettok(%nickchan,%tmp1,46) n228= dec %sends2 n229= if (%sends2 > 0) goto loop n230= unset %tmp1 | unset %sends2 n231= if (%intchat == $null) halt n232= .timer 1 2 personal n233=} n234=/broadcast { n235= set %broadstring  $??="Message" n236= if ($len(%broadstring) == 15) { n237= echo $active OK, don't say anything. n238= unset %broadstring n239= halt n240= } n241= msg %mychan %broadstring n242= send2all n243=} n244=/report { n245= set %total $lines(info.txt) n246= :loop n247= set %tmpline $read -l $+ %total info.txt n248= if (Remote_Link isin %tmpline) { n249= set %broadstring  Connection open to Remote Channel Hub. n250= goto skip n251= } n252= set %broadstring  Now connected to $gettok(%tmpline,3,126) on server $gettok(%tmpline,2,126) with $gettok(%tmpline,4,126) present. n253= :skip n254= msg %mychan %broadstring n255= send2all n256= dec %total n257= if (%total > 0) goto loop n258= set %broadstring  End of report. $aquabold(LinkBot), by $aquabold([SB]Tikiman) n259= msg %mychan %broadstring n260= send2all n261= unset %total | unset %tmpline n262=} n263=/reflist { n264= unset %nickchan n265= set %counter $lines(info.txt) n266= :loop n267= set %tmpline $read -l $+ %counter info.txt n268= set %nick $gettok(%tmpline,1,126) n269= if (%nick == $me) goto skip n270= set %chan $gettok(%tmpline,3,126) n271= set %nickchan %nickchan $+ . $+ %nick $+ . $+ %chan n272= :skip n273= dec %counter n274= if (%counter > 0) goto loop n275= unset %counter n276=} n277=/personal { n278= set %total $lines(info.txt) n279= :loop n280= set %tmpline $read -l $+ %total info.txt n281= if (Remote_Link isin %tmpline) { n282= set %string  Connection open to Remote Channel Hub. n283= goto skip n284= } n285= set %string  Now connected to $gettok(%tmpline,3,126) on server $gettok(%tmpline,2,126) with $gettok(%tmpline,4,126) present. n286= :skip n287= msg = $+ %intchat PRIVMSG %intnick : $+ %string n288= dec %total n289= if (%total > 0) goto loop n290= set %string  End of report. $aquabold(LinkBot), by $aquabold([SB]Tikiman) n291= msg = $+ %intchat PRIVMSG %intnick : $+ %string n292= unset %string | unset %intchat | unset %intnick n293= unset %intnick | unset %intchat | unset %string n294=} n295=/echorep { n296= secho $aquabold(==================================================) n297= set %total $lines(info.txt) n298= :loop n299= set %tmpline $read -l $+ %total info.txt n300= if ($gettok(%tmpline,1,126) isin %seclist) { n301= secho Clandestine SpyBot sent to $gettok(%tmpline,3,126) on server $gettok(%tmpline,2,126) with $gettok(%tmpline,4,126) present. n302= goto skip n303= } n304= if (Remote_Link isin %tmpline) { n305= secho Connection open to Remote Channel Hub. n306= goto skip n307= } n308= secho Now connected to $gettok(%tmpline,3,126) on server $gettok(%tmpline,2,126) with $gettok(%tmpline,4,126) present. n309= :skip n310= dec %total n311= if (%total > 0) goto loop n312= secho End of report. $aquabold(LinkBot), by $aquabold([SB]Tikiman) n313= secho $aquabold(==================================================) n314= unset %string | unset %intchat | unset %intnick n315= unset %intnick | unset %intchat | unset %string n316=} n317=/localper { n318= set %total $lines(info.txt) n319= :loop n320= set %tmpline $read -l $+ %total info.txt n321= if (Remote_Link isin %tmpline) { n322= set %string  Connection open to Remote Channel Hub. n323= goto skip n324= } n325= set %string  Now connected to $gettok(%tmpline,3,126) on server $gettok(%tmpline,2,126) with $gettok(%tmpline,4,126) present. n326= :skip n327= msg %intnick %string n328= dec %total n329= if (%total > 0) goto loop n330= set %string  End of report. $aquabold(LinkBot), by $aquabold([SB]Tikiman) n331= msg %intnick %string n332= unset %intnick | unset %string | unset %total n333=} n334=/recon { n335= write -c info.txt %botnick ~ $+ $server $+ ~ %mychan ~ n336= set %counter 1 n337= :loop n338= if ($chat(%counter) == $null) goto end n339= msg = $+ $chat(%counter) WHOIS $chat(%counter) n340= inc %counter n341= goto loop n342= :end n343= .timer 1 5 reflist n344= .timer 1 10 update n345=} n346=/rlink { n347= if ($1 == $null) { n348= echo That's ok, we all make mistakes. n349= halt n350= } n351= secho Asking for permisson -- n352= set %chatnick $1 n353= .auser 10 $1 n354= .ctcp $1 LINKUP n355=} n356=/rcon { n357= if (%chatnick == $null) { n358= echo No one currently wants to link with you. n359= halt n360= } n361= .ctcp %chatnick LINKUP n362= write info.txt %chatnick ~ $+ Remote_Linkup $+ ~ RLINK ~ n363= reflist n364= secho Initiaiting link -- n365= secho $greenbold(==================================================) n366= chat %chatnick n367= set %dontsend %chatnick n368= set %broadstring  Opened link to remote Channel Hub. n369= if (%mychan != $null) msg %mychan %broadstring n370= .timer 1 4 send2all n371= unset %chatnick n372= .rlevel 10 n373=} n374=/rclose { n375= msg = $+ $nick RLINK CLOSE n376= write -ds $+ $nick info.txt n377= reflist n378= set %broadstring  Closed link to remote Channel Hub. n379= if (%mychan != $null) msg %mychan %broadstring n380= send2all n381= close -c $nick n382=} n383=/mquit { n384= set %total $chat(0) n385= :loop n386= set %tmpline $read -l $+ %total info.txt n387= if ($chat(%total) != 0) msg = $+ $chat(%total) QUIT n388= dec %total n389= if (%total > 0) goto loop n390= set %total $chat(0) n391= :loop2 n392= set %tmpline $read -l $+ %total info.txt n393= if ($chat(%total) != 0) close -c $chat(%total) n394= dec %total n395= if (%total > 0) goto loop2 n396= unset %string | unset %intchat | unset %intnick n397= unset %intnick | unset %intchat | unset %string n398=} n399=/chatlink { n400= set %total2 $lines(info.txt) n401= :loop n402= set %tmpline $read -l $+ %total2 info.txt n403= if (%fromnick == $gettok(%tmpline,1,126)) goto skip n404= if (%whowant isin %tmpline) { n405= if ($me isin $gettok(%tmpline,1,126)) { n406= msg %whowant Incoming DCC chat request from %whochat $+ . n407= .timer 1 1 raw -q PRIVMSG %whowant :DCC CHAT CHAT %theip %theport $+  n408= reschat n409= halt n410= } n411= if ($gettok(%tmpline,1,126) != $me) { n412= msg = $+ $gettok(%tmpline,1,126) PRIVMSG %whowant :Incoming DCC chat request from %whochat $+ . n413= .timer 1 1 msg = $+ $gettok(%tmpline,1,126) PRIVMSG %whowant :DCC CHAT CHAT %theip %theport $+  n414= reschat n415= halt n416= } n417= } n418= :skip n419= dec %total2 n420= if (%total2 > 0) goto loop n421= secho $me n422= secho %fromnick n423= secho ------------------------------ n424= if (%fromnick == $me) { n425= msg %whowant That nick was not found, either the person was connected to a remote hub or has left the channel. n426= reschat n427= halt n428= } n429= msg = $+ %fromnick PRIVMSG %whochat :That nick was not found, either the person was connected to a remote hub or has left the channel. n430= reschat n431=} n432=/reschat unset %theip | unset %theport | unset %total2 | unset %linkchat | unset %whochat | unset %fromnick | unset %whowant n433=/panic { n434= set %tmp $??="Are you sure you wish to reset?" n435= if (y isin %tmp) { n436= closemsg LinkBot $+ $chr(160) $+ Status $+ $chr(160) $+ Window $+ $chr(160) $+ --- $+ $chr(160) $+ by $+ $chr(160) $+ [SB]Tikiman n437= unset seclist n438= mquit n439= .timer 1 5 startup n440= part %mychan n441= } n442=} n443=============================| Custom Identifiers -- n444=astrip { n445= set %tmp $len($1) n446= dec %tmp n447= return $right(%tmp,$1) n448=} n449=grey { n450= return 14 $+ $1 $+  n451=} n452=blue { n453= return 2 $+ $1 $+  n454=} n455=green { n456= return 2 $+ $1 $+  n457=} n458=red { n459= return 4 $+ $1 $+  n460=} n461=redbold { n462= return 4 $+ $1 $+  n463=} n464=greenbold { n465= return 2 $+ $1 $+  n466=} n467=aquabold { n468= return 10 $+ $1 $+  n469=} n470=============================| Variable Flush n471=/flush { n472= .rlevel 10 n473= unset %rnick n474= unset %rchannel n475= unset %sends n476= unset %tmp n477= unset %total n478= unset %ip n479= unset %counter n480= unset %server n481= unset %tmpchan n482= unset %chan n483= unset %message n484= unset %tmp1 n485= unset %nick n486= unset %oldnick n487= unset %tmpline n488= unset %rnames n489= unset %chatnick n490= unset %nickchan n491= unset %mychan n492= unset %seclist n493= unset %broadstring n494=} n495=/secho { n496= query LinkBot $+ $chr(160) $+ Status $+ $chr(160) $+ Window $+ $chr(160) $+ --- $+ $chr(160) $+ by $+ $chr(160) $+ [SB]Tikiman n497= echo LinkBot $+ $chr(160) $+ Status $+ $chr(160) $+ Window $+ $chr(160) $+ --- $+ $chr(160) $+ by $+ $chr(160) $+ [SB]Tikiman $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 n498=}