# This is under a BSD-Style copyright. I.e. do what you want, as long as you # give credit. -- Sec # ### Dies ist der #blafasel-CountEr. # # Dieser Code steht unter einem BSD-artigen Copyright. Kurz: tu was du willst, # so lange du den Ursprung erwaehnst. -- Sec # ^set realname I'm a bot! ^assign line.chan #blafasel alias v { assign ver.$encode($0).txt was released on $1 $2 and has a Log of "$4-" assign line.vers $0 assign line.verslong #blafasel-CountEr $0 $1 $2, first version 10/97 } assign oldver Start alias t { assign ver.$encode($oldver).next $0 assign ver.$encode($0).txt Version $0 $1- assign ver.old $oldver assign oldver $0 } v Start 09.10.1997 - - initial version. v v0.2 12.10.1997 20:47 v v0.3 12.04.1998 21:00 v v0.4 26.11.1998 17:29 v v0.5 12.03.1999 03:01 - seen feature. # 15.05.1999 - added tla # 27.06.1999 - added kfz v v0.6 06.06.1999 29:27 - tla/ httpd v v0.7 25.04.2000 15:26 - added 'overview' v v0.8 11.05.2000 20:29 - added avon and plz v v0.9 23.06.2000 17:54 - added caching to url, added remind, # - added /map & /list to http v v0.9a 02.09.2000 03:33 - added tel v v0.9b 02.12.2000 18:33 - added prev v v0.9c 03.12.2000 14:38 - added $durch() damit words/line und words/hr # - komma hat. Feldbreiten (words jetzt sechsstellig) v v0.9d 01.01.2001 05:19 - fixed ranks lines v v0.9e 14.02.2001 05:19 - Move to ice. /exec-pfadnamen gefixed. v v0.9f 24.05.2001 14:49 - MVV von axel, KURS v v0.9g 01.06.2001 16:34 - WETTER von hoeni(wetter.web.de) v v0.9h 04.06.2001 14:54 - added spell v v0.9i 21.06.2001 01:18 - added fb v v0.9j 02.07.2001 12:16 - added (en|de)morse v v0.9k 02.07.2001 18:33 - added bs (bullshit) from hoeni v v0.9l 17.07.2001 15:00 - added new mvv from axel # v0.9m 28.07.2001 11:59 - added danke on req. from Joseph v v0.9n 18.09.2001 14:34 - added ebay v v0.9o 04.10.2001 12:22 - added topic on req. from hoeni v v0.9p 11.10.2001 18:57 - added port and where v v0.9q 15.10.2001 14:06 - added protocol v v0.9q 15.10.2001 23:12 - added oui v v0.9r 16.10.2001 15:52 - added google v v0.9r 21.10.2001 23:51 - added rfc # v0.9s 29.10.2001 21:12 - added np v v0.9t 03.12.2001 21:22 - added urlen, to filter URLs # v0.9u 07.12.2001 14:32 - added pwgen # v0.9v 01.01.2002 22:49 - added whatis # v0.9w 13.02.2002 22:49 - added hrlines (web only) v v0.9x 12.03.2002 18:04 - added cidr # v0.9y 12.03.2002 18:04 - umlaut->umlaute alias fuer hoeni v v0.9z 20.03.2002 16:12 - added trenne from inof # 11.04.2002 15:51 - added tel/rtel # 13.04.2002 20:25 - updated google for googleAPI(SOAP) # 19.05.2002 00:29 - updated wetter(wetter-online.de), added bio v v0.9ä 10.06.2002 16:59 - added wm(http://www.ndr.de/) from data. # 21.06.2002 17:09 - added http auth (/no, /sec) and /url notices it. v v0.9æ 28.08.2002 03:30 - added blz (rq mela) v v0.9ç 29.10.2002 12:11 - added fone # 08.11.2002 00:49 - added http (protocol responses) and HELP2 # 17.12.2002 14:53 - added dc (similar to calc) # 22.01.2003 00:45 - added rel # 21.03.2003 17:07 - added smiley # 14.05.2003 - updated jargon # 16.05.2003 01:44 - added xyzzy # 03.08.2003 16:38 - added apropos # 05.10.2003 - added mcd # 06.10.2003 01:09 - added lang (iso639-1/iso639-2 codes) (rq bg) # 06.10.2003 01:51 - updated country v v0.9ê 06.10.2003 03:11 - rewritten help, released. # 16.10.2003 11:59 - added kneip # 07.05.2004 13:40 - added termin # 14.06.2004 11:20 - fixed stupid security bug. # 25.06.2004 12:09 - added IDN (punycode and back) # 27.07.2004 23:55 - wetter back to wetter.web.de # 17.09.2004 09:42 - color # 03.11.2004 01:27 - added TZ (rq cecile) # 05.11.2004 11:35 - added dico (french dict) (rq cecile) # 23.01.2005 22:33 - added bcal (v1) # 27.04.2005 15:28 - added airport # 02.05.2005 21:04 - added roll (cecile idea) # 10.06.2005 13:22 - added iata (req axel_f) # 12.07.2005 13:29 - added coord (req mrg) # 16.07.2005 12:03 - added firstseen (data collection since 2002) # 16.07.2005 12:30 - added gender # 22.07.2005 - added urlcheck, and dupeurl-notice # 22.07.2005 21:00 - added -p for tla #ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ t v0.9f talks MVV. Thanks to axel and www.bayerninfo.de t v0.9g added a gateway for WETTER (courtesy of hoeni and wetter.web.de) t v0.9h has a SPELL feature, and MOTD which you now see. t v0.9i now features "FB" to search the "Fachbegriffe der Informatik" t v0.9j can convert Text to MORSE characters t v0.9k can emit bullshit mini-phrases with BS. t v0.9l updates MVV with a slightly different & enhanced syntax (aliases) t v0.9n features "EBAY" to look up an ebay.de auction by number t v0.9o enabled "TOPIC" to see the current and past topics t v0.9p can answer "WHERE" to download a program and which "PORT" a service has t v0.9q also knows about ip "PROTOCOL"s and ethernet "OUI"s t v0.9r added "GOOGLE" and "RFC" t v0.9t regained the urlcatcher. Opt-in and have any URLs you say publically displayed on the web by using "/cc urlen on". t v0.9x can convert IPs with "CIDR". Also added WHATIS, PWGEN and a fixed NP. t v0.9z now features "TRENNE" to show German hyphenations of words. t v0.9ä gateways "WM" for Soccer World Championship results t v0.9æ features "BLZ" to cater your banking needs ;-) t v0.9ç has "FONE" to try to map your phone number to geographical location. t v0.9ê has several new features since the last update. HTTP, DC, MCD... See "HELP DB" for a list of all possible information queries. # /switch is recursive. This needs to be set high enough. set max_recursions 450 # Number of ranks a person can advance at a time. # For external queries (avon, tv ...) set exec_p off # some really obscure bug... on ^exec_errors "*junk pointer, too high to make sense." # on ^exec_errors "*junk pointer, too high to make sense" # # even more obscure. IRC is LATIN-1 and will probably stay that way forever. setenv LC_CTYPE de_DE.ISO_8859-1 # There are waaay to much hardcoded limits in here. # Dont be afraid. it's been working perfectly for over 3 Years with # more than 500 known users. /alias help { echo +++ I know of: echo +++ fprint (fast, uses table) echo +++ print.lines print.words (slow) echo +++ list.note list.alias (to list tables) echo +++ delete (needs resort afterwards) echo +++ reload (load script), restart (load db and sort) echo +++ start (to reset everything and start counting) echo +++ dump (to save db (done hourly automatically)) } alias start { ^set novice off ^on ^public * # ^on ^action * # ^on #timer 70 -* ^on raw_irc -"% SILENCE %" ^on -timer 01:00 timer 25 dump ^on -timer 05:00 timer 25 dump ^on -timer 09:00 timer 25 dump ^on -timer 13:00 timer 25 dump ^on -timer 18:00 timer 25 dump ^on -timer 22:00 timer 25 dump ^assign line.start $time() ^assign max.uptime $time() foreach lines ii { ^assign -lines[$ii] } foreach words ii { ^assign -words[$ii] } # foreach redir ii { # ^assign -redir[$ii] # } load country.irc load mcd.irc load spelling.irc load morse.irc load kfz.irc load tla.irc load hms load httpd httpd 8888 load urlcatcher starturl start.2 load count_chanusers load cursor load remind # Fuer KarlE, 24.1.01 - Seine Firewall mag sonst nicht. httpd 8080 load topiclist starttopic load seufz #linestats ^assign hr $left(2 $Z) @ hrlines = 0 } alias reload load linecount alias restart { echo *** Attempting restart... start echo *** Starting: $stime($line.start) load /var/tmp/dump echo *** Starting: $stime($line.start) echo *** Resorting ... fsort lines echo *** Halfway done. fsort words echo *** Done ... } alias start.2 { ^on #-public 12 "* $line.chan *" countln \$0- ^on #-action 12 "* $line.chan *" countln \$0- } # mini-doku as of 26.11 # always means $encode(Nick) - and thus case sensitive. # # Arrays: (important to be kept) # redir. = # - set if seen. used for aliases (and ignore) # # note. = on|off # - has note turned on or off. You get notified if unset and rank<15 # # urlen. = on|off # - wants his URLs to be seen on the Web # # lines. = # words. = # - The main memory. # # seen. = unixtime nick u@h # # line.<...> # - various houskeeping. # # # (deletable) # # platz.{lines|words}.nam. = # platz.{lines|words}.nr. = # - The "keep everything sorted" array. recreated on restart. # # account (nickname) # count / count.2 (for calculations) # country. (from uni/country.irc) # spell. (from spelling.irc) # morse. (from morse.irc) # tla. (from tla.irc) # mvv.{alias,aliat}.encode(tolower()) (aliases for the mvv gateway) # ii / jj (foreach runvars) # hrlines[00-23] is lines said in that hour. on #^timer 11 "*:00" { echo In hour $hr there were $hrlines lines. @ hrlines[$hr] = hrlines if ([$hrlinesmax]<[$hrlines]) { @ hrlinesmax = hrlines ^assign ii $time() @ ii = ii - 60 ^assign ii $stime($ii) ^assign hrlinesmax.d $mid(8 2 $ii).$mid(4 3 $ii) $hr:00-$left(2 $0):00 } ^assign hr $left(2 $0) @ hrlines = 0 } alias countln { if (![$redir[$encode($0)]]){ notice $0 Hi, I'm a small statistic/utility bot. Use /ctcp $N HELP for more info. notice $0 /ctcp $N IGNORE to be omitted from the statistics. echo +++ Information sent to $0 ^assign redir[$encode($0)] $encode($0) } if (![$fseen[$encode($0)]]){ ^assign fseen[$encode($0)] $time() $0 $userhost() } @ hrlines = hrlines + 1 ^assign account $redir[$encode($0)] if ([$account] != [DMGJGHGOGPHCGFDO]){ ^assign seen[$account] $time() $0 $userhost() if ([$lines[$account]] > [40]){ if (![$note[$account]]){ ^notice $0 Do you already know about the "note" feature? ^assign note[$account] off } } if ([$motd[$account]]){ if ([$motd[$account]] != [$line.vers]){ if (![$ver[$encode($motd[$account])][txt]){ ^assign motd[$account] $line.vers }{ ^assign motd[$account] $ver[$encode($motd[$account])][next] } ^notice $0 $ver[$encode($motd[$account])][txt] } } ^assign line $2- @ lines[$account] = lines[$account] + 1 switch lines if ([$_.notify.up]){ ^notify_user lines up $_.notify.up ^assign -_.notify.up } @ words[$account] = words[$account] + #line switch words if ([$_.notify.up]){ ^notify_user words up $_.notify.up ^assign -_.notify.up } @ total.lines = total.lines + 1 @ total.words = total.words + #line } } alias switch { @ _.myplatz = platz[$0].nam[$account] if ( ![$_.myplatz] ) { @ platz[$0].max = platz[$0].max + 1 #echo *** Newbie $decode($account) , $_.myplatz $(platz.$0.nam.$account) - \($0\) @ $(platz.$0.max) ^assign platz.$0.nr.$(platz.$0.max) $account ^assign platz.$0.nam.$account $(platz.$0.max) @ _.myplatz = platz[$0].nam[$account] } @ _.platz = platz[$0].nam[$account] - 1 @ _.platznam = platz[$0].nr[$_.platz] #echo *** $0: $decode($account) - $($0.$account) - $_.platz - $($0.$(_.platznam)) - $decode($_.platznam) if (( [$_.platz] > [0] ) && ( [$($0.$account)] > [$($0.$(_.platznam))])){ ^assign platz[$0].nr[$_.myplatz] $_.platznam ^assign platz[$0].nam[$_.platznam] $(platz.$0.nam.$account) ^assign platz[$0].nr[$_.platz] $account ^assign platz[$0].nam[$account] $_.platz # if ( [$_.platz] < [11] ) { ^assign _.notify.up $account ^notify_user $0 down $_.platznam # } #^echo switched ranks $decode($account) / $decode($_.platznam) - $0 switch $0 } } alias notify_user { if ([$note[$2]]){ if ([$note[$2]] != [off]){ if ([$1] == [up]){ notice $decode($2) You climbed up to $platz[$0][nam][$2]\. \($0\) }{ notice $decode($2) $decode($_.notify.up) pushed you down to $platz[$0][nam][$2]\. \($0\) } }} } alias fsort { ^assign -$0\.DMGJGHGOGPHCGFDO if ([$0]){ foreach $0 ii { ^assign out.$ii $($0\.$ii) } foreach platz.$0.nam ii { ^assign -platz.$0.nam[$ii] } foreach platz.$0.nr ii { ^assign -platz.$0.nr[$ii] } @ platz = 0 @ platz2 = 0 @ max.old = 0 foreach $0 ii { @ platz2 = platz2 + 1 @ max = 0 foreach out jj { if ( [$out[$jj]] > [$max] ) { ^assign maxnam $jj @ max = out[$jj] } } if ([$max] != [$max.old]){ @ platz = platz + 1 } @ max.old = max ^assign platz.$0.nr.$platz2 $maxnam ^assign platz.$0.nam.$maxnam $platz2 #echo *** $decode($maxnam): $max ^assign -out[$maxnam] } ^assign platz.$0.max $platz2 }{ echo *** You must supply "lines" or "words" } } #alias sort { # ^assign -$0\.DMGJGHGOGPHCGFDO # foreach $0 ii { # ^assign out.$ii $($0\.$ii) # } # @ line.tdiff = time() - line.start # @ platz = 0 # @ max.old = 0 # foreach $0 ii { # #@ platz = platz + 1 # @ max = 0 # foreach out jj { # if ( [$out[$jj]] > [$max] ) { # ^assign maxnam $jj # @ max = out[$jj] # } # } # if ([$max] != [$max.old]){ # @ platz = platz + 1 # } # @ max.old = max # @ count = ( max * 3600 ) / line.tdiff # #^assign platz.$platz $maxnam # #echo *** $decode($maxnam): $max # eval $1- # ^assign -out[$maxnam] # } #} alias f2sort { ^assign -line.print @ platz2 = 1 @ platz = 0 @ line.tdiff = time() - line.start @ max.old = 0 ^assign max.run $1 while ( platz < max.run ) { @ maxnam = platz[$0].nr[$platz2] ^assign max $($0.$maxnam) @ count = ( max * 3600 ) / line.tdiff if ([$max] != [$max.old]){ @ platz = platz + 1 } eval $2- @ max.old = max @ platz2 = platz2 + 1 if ( [$platz2] > 500 ){ echo ** FatalF @ platz = 999 @ max.run = 1 } if ( ! [$(platz.$0.nr.$platz2)] ){ @ platz = 999 @ max.run = 1 } } } alias println { ^assign -line.print f2sort $0 10 ^assign line.print \$line.print \$platz:\\\(\$max\\\) \$decode($maxnam)\\\; #echo %%% $line.print } alias print.lines { echo *** Line/Word-counts on $line.chan: echo *** \($stime($line.start) - $stime($time())\) f2sort lines 399 echo *** Rank \$[-3]platz: \$[9]decode($maxnam) \$[-4]max lines =\$[-3]count l/hr.\$[-6]words[\$maxnam] w. } alias print.words { echo *** Wordcounts \($stime($line.start) - $stime($time())\): f2sort words 399 echo *** Rank \$[-3]platz: \$[9]decode($maxnam) \$[-6]max words =\$[-3]count w/hr. } alias fprint { echo *** Line/Word-counts on $line.chan: echo *** \($stime($line.start) - $stime($time())\) @ platz = 1 ^assign platz $0 while ( platz < 400 ) { @ maxnam = platz.lines.nr[$platz] @ max = lines[$maxnam] echo *** Rank$[-4]platz: $[9]decode($maxnam) $[-4]max lines, $[-5]words[$maxnam] w. @ platz = platz + 1 if ( ! [$platz.lines.nr[$platz]] ){ @ platz = 999 } } } alias delete { if (![$0]){ echo *** You must supply an nickname for /delete }{ echo *** Deleting $0 from WORD/LINE stats ^assign -lines.$encode($0) ^assign -words.$encode($0) if ([$1]){ delete $1- }{ echo *** you should /fsort {lines,words} now %-) } } } alias list.note { ^assign line.print Note turned on: ^assign line.print2 Note turned off: foreach note ii { if ([$note[$ii]] == [on]){ ^assign line.print $line.print $decode($ii), } if ([$note[$ii]] == [off]){ ^assign line.print2 $line.print2 $decode($ii), } } echo *** $line.print echo *** $line.print2 } alias list.alias { ^assign line.print Already seen: ^assign line.print2 Ignoring: foreach redir ii { if ([$ii] != [$redir[$ii]]){ if ([$redir[$ii]] == [DMGJGHGOGPHCGFDO]){ ^assign line.print2 $line.print2 $decode($ii), }{ echo *** $[9]decode($ii) is aliased to $[9]decode($redir[$ii]) } }{ # ^assign line.print $line.print $decode($ii), } } echo *** $line.print2 # if ([$0]){ # echo *** $line.print # } } alias dump { ^assign -line.print ^assign -line.print2 exec -name dump mv /var/tmp/dump /home/sec/.counterdump\;cat >/var/tmp/dump exec -in %dump # CountEr - dump from $stime($time()) ^exec -in %dump assign line.start $line.start foreach words ii {^exec -in %dump assign words.$ii $words[$ii]} foreach lines ii {^exec -in %dump assign lines.$ii $lines[$ii]} foreach line ii {^exec -in %dump assign line.$ii $line[$ii]} foreach redir ii {^exec -in %dump assign redir.$ii $redir[$ii]} foreach note ii {^exec -in %dump assign note.$ii $note[$ii]} foreach seen ii {^exec -in %dump assign seen.$ii $seen[$ii]} foreach fseen ii {^exec -in %dump assign fseen.$ii $fseen[$ii]} foreach gender ii {^exec -in %dump assign gender.$ii $gender[$ii]} foreach motd ii {^exec -in %dump assign motd.$ii $motd[$ii]} foreach urlen ii {^exec -in %dump assign urlen.$ii $urlen[$ii]} foreach urlrs ii {^exec -in %dump assign urlrs.$ii $urlrs[$ii]} foreach rel ii { foreach rel.$ii jj { ^exec -in %dump assign rel.$ii\.$jj $rel[$ii][$jj] ^exec -in %dump assign relc.$ii\.$jj $relc[$ii][$jj] } } foreach tla ii {^exec -in %dump assign tla.$ii $tla[$ii] if (ula[$ii]) {^exec -in %dump assign ula.$ii $ula[$ii]} } foreach mvv.alias ii {^exec -in %dump assign mvv.alias.$ii $mvv[alias][$ii] ^exec -in %dump assign mvv.aliat.$ii $mvv[aliat][$ii] } foreach stack.url ii {^exec -in %dump assign stack.url.$ii $stack.url[$ii]} foreach stack.topic ii {^exec -in %dump assign stack.topic.$ii $stack.topic[$ii]} foreach httpd.user.u ii {^exec -in %dump httpd.useradd $decode($ii) $httpd.user.u[$ii]} ^exec -in %dump assign stack.url $stack.url ^exec -in %dump assign stack.topic $stack.topic # ^exec -in %dump assign total.lines $total.lines # ^exec -in %dump assign total.words $total.words ^exec -in %dump # File correctly closed. exec -close %dump } on -ctcp "% % firstseen" { ctcp.check.v2 ctcp.firstseen $0- } on -ctcp "% % seen" { ctcp.check.v2 ctcp.seen $0- } on -ctcp "% % stats" { ctcp.check ctcp.stats $0- } on -ctcp "% % prev" { ctcp.check ctcp.prev $0- } on -ctcp "% % next" { ctcp.check ctcp.next $0- } on -ctcp "% % words" { ctcp.check ctcp.words $0- } on -ctcp "% % lines" { ctcp.check ctcp.lines $0- } on -ctcp "% % note *" { ctcp.check.nopar ctcp.note $0- } on -ctcp "% % urlen *" { ctcp.check.nopar ctcp.urlen $0- } on -ctcp "% % gender *" { ctcp.check.nopar ctcp.gender $0- } on -ctcp "% % pw *" { ctcp.check.nopar ctcp.pw $0- } on -ctcp "% % motd *" { ctcp.check.nopar ctcp.motd $0- } on -ctcp "% % topic *" { ctcp.check.nopar ctcp.topic $0- } on -ctcp "% % stat *" { if ([$3]==[]) { ctcp $0 error You must supply a number (rank) as argument. }{ ctcp.stat $0 $3 } } alias gender { @ FUNCTION_RETURN = [He himself] if ([$gender[$0]] == [male] ) { @ FUNCTION_RETURN = [He himself] } if ([$gender[$0]] == [female] ) { @ FUNCTION_RETURN = [She herself] } if ([$gender[$0]] == [neutral] ) { @ FUNCTION_RETURN = [It itself] } if ([$1] == [$0] ) { @ FUNCTION_RETURN = [You yourself] } set debug 0 } # ctcp.check alias ctcp.check { if ([$match($1 $chanusers($line.chan))] == [0]) { ctcp $1 error You are not on $line.chan\. }{ if ( [$4] ) { ^assign account $encode($4) ^assign max.tell $4's }{ ^assign account $redir[$encode($1)] ^assign max.tell Your alias' \($decode($account)\) } if ( [$account] == [$encode($1)]) { ^assign max.tell Your } if ( ! [$(lines.$account)] ){ ctcp $1 error $decode($account) does not exist [tm]. notice $1 Did you remember that names are case sensitve ? }{ $0- } } } alias ctcp.check.nopar { if ([$match($1 $chanusers($line.chan))] == [0]) { ctcp $1 error You are not on $line.chan\. }{ ^assign account $redir[$encode($1)] ^assign max.tell Your alias' \($decode($account)\) if ( [$account] == [$encode($1)]) { ^assign max.tell Your } if ( ! [$(lines.$account)] ){ ctcp $1 error $decode($account) does not exist [tm]. notice $1 Did you remember that names are case sensitve ? }{ $0- } } } alias ctcp.check.v2 { if ([$match($1 $chanusers($line.chan))] == [0]) { ctcp $1 error You are not on $line.chan\. }{ if ( [$4] ) { ^assign -account ^assign account $redir[$encode($4)] if ( [$account] == [$encode($4)]) { ^assign max.tell $4 has been }{ ^assign max.tell $decode($account) \($4\) has been } }{ ^assign account $redir[$encode($1)] ^assign max.tell Your alias \($decode($account)\) has been } if ( [$account] == [$encode($1)]) { ^assign max.tell You have been } if ( ! [$(seen.$account)] ){ if ( ! [$account] ){ ctcp $1 error Didn't see $4 on $line.chan [tm]. }{ ctcp $1 error Didn't see $decode($account) on $line.chan [tm]. } notice $1 Did you remember that names are case sensitve ? }{ ^assign hsi $gender($account $encode($1)) $0- } } } alias ctcp.seen { @ line.tdiff = time() - word(0 $seen[$account]) notice $0 $max.tell last seen$hms.do($line.tdiff) ago [$stime($word(0 $seen[$account]))] notice $0 $word(0 $hsi) called $word(1 $hsi) $word(1 $seen[$account]) from $word(2 $seen[$account]) } alias ctcp.firstseen { if ([$word(0 $fseen[$account])] < [1052310581]) { notice $0 $max.tell first seen before the beginning of time. notice $0 $word(0 $hsi) called $word(1 $hsi) $word(1 $fseen[$account]) from $word(2 $fseen[$account]) }{ @ line.tdiff = time() - word(0 $fseen[$account]) notice $0 $max.tell first seen$hms.do($line.tdiff) ago [$stime($word(0 $fseen[$account]))] notice $0 $word(0 $hsi) called $word(1 $hsi) $word(1 $fseen[$account]) from $word(2 $fseen[$account]) } } alias ctcp.stat { if ([$match($0 $chanusers($line.chan))] == [0]) { ctcp $0 error You are not on $line.chan\. }{ @ line.tdiff = time() - line.start @ account = platz.lines.nr[$1] notice $0 On Rank $1 there are: @ count = ( lines[$account] * 3600 ) / line.tdiff @ count.2 = words[$account] / lines[$account] notice $0 $[9]decode($account) with $[-6]lines[$account] Lines \($[-2]count Lines/hr,$[-3]count.2 Words/Line\)\. @ account = platz.words.nr[$1] @ count = ( words[$account] * 3600 ) / line.tdiff @ count.2 = words[$account] / lines[$account] notice $0 $[9]decode($account) with $[-6]words[$account] Words \($[-2]count Words/hr,$[-3]count.2 Words/Line\)\. }} alias ctcp.stats { @ line.tdiff = (time() - line.start) / 60 notice $0 $max.tell current overall-stats since $stime($line.start): @ count = durch( ${ lines[$account] * 60 } $line.tdiff) notice $0 $[-6]lines[$account] Lines \($[-4]count Lines/hr\) = rank $[-3]platz.lines.nam[$account]\. @ count = durch( ${ words[$account] * 60 } $line.tdiff) notice $0 $[-6]words[$account] Words \($[-4]count Words/hr\) = rank $[-3]platz.words.nam[$account]\. $[-5]durch($words[$account] $lines[$account]) Words/Line } alias durch { @ function_return = [$0]/[$1] ## [.] ## ([$0] * 10)/[$1] - ([$0]/[$1])*10 } alias ctcp.next { notice $0 $max.tell current enemies: ctcp.next.help $0 lines ctcp.next.help $0 words } alias ctcp.prev { notice $0 $max.tell current enemies: ctcp.prev.help $0 lines ctcp.prev.help $0 words } alias ctcp.prev.help { @ max.rank = platz[$1].nam[$account] + 1 @ max.enemy = platz[$1].nr[$max.rank] @ max.diff = [$1][$account] - [$1][$max.enemy] notice $0 $[-9]decode($max.enemy) \($[-2]max.rank) is $[-5]max.diff $1 below. } alias ctcp.next.help { @ max.rank = platz[$1].nam[$account] - 1 if ([$max.rank] > 0){ @ max.enemy = platz[$1].nr[$max.rank] @ max.diff = [$1][$max.enemy] - [$1][$account] notice $0 $[-9]decode($max.enemy) \($[-2]max.rank) is $[-5]max.diff $1 ahead. }{ notice $0 You should really remain silent :-P } } alias ctcp.words { ctcp $0 words $max.tell currently said $words[$account] Words since $stime($line.start) @ count = ( words[$account] * 3600 ) / line.tdiff ctcp $0 words This makes approx. $count Words/hr and puts you on rank $platz.words.nam[$account]. } alias ctcp.lines { ctcp $0 lines You currently have said $lines[$encode($0)] lines since $stime($line.start) @ count = ( lines[$account] * 3600 ) / line.tdiff ctcp $0 lines This makes approx. $count Lines/hr and puts you on rank $platz.lines.nam[$account]. } on -ctcp "% % rank *" { ctcp $0 error You probably mean "RANKS $3", don't you? } on -ctcp "% % ranks" { ctcp $0 error You must supply at least "LINES" or "WORDS". } on -ctcp "% % ranks lines" { if ([$match($0 $chanusers($line.chan))] == [0]) { ctcp $0 error You are not on $line.chan\. }{ println lines ctcp $0 stats Current LINE-standings: $line.print } } on -ctcp "% % ranks words" { if ([$match($0 $chanusers($line.chan))] == [0]) { ctcp $0 error You are not on $line.chan\. }{ println words ctcp $0 stats Current WORD-standings: $line.print } } on -ctcp "% % ignore" { if ([$match($0 $chanusers($line.chan))] == [0]) { ctcp $0 error You are not on $line.chan\. }{ ctcp $0 ignore You will not be accounted from now on. ^assign redir[$encode($0)] DMGJGHGOGPHCGFDO } } on -ctcp "% % unignore" { if ([$match($0 $chanusers($line.chan))] == [0]) { ctcp $0 error You are not on $line.chan\. }{ ctcp $0 ignore You will accounted as $0 from now on. ^assign redir[$encode($0)] $encode($0) } } on -ctcp "% % total" { if ([$match($0 $chanusers($line.chan))] == [0]) { ctcp $0 error You are not on $line.chan\. }{ @ line.tdiff = (time() - line.start) / 60 @ count = durch( ${ total.lines * 60 } $line.tdiff) @ count.2 = durch( ${ total.words * 60 } $line.tdiff) notice $0 $total.lines lines and $total.words words so far on $line.chan\. notice $0 Averaging at $count Lines/hr, $count.2 Words/hr\. } } on -ctcp "% % alias *" { if ([$match($0 $chanusers($line.chan))] == [0]) { ctcp $0 error You are not on $line.chan\. }{ if ( [$3] ) { ctcp $0 alias You will be accounted as $3 from now on. notice $0 Did you remember that aliases are case sensitve ? ^assign redir[$encode($0)] $encode($3) }{ ctcp $0 alias You are currently aliased to $decode($redir[$encode($0)]). } } } # checkvaliduser( ) alias checkvaliduser { ^assign -function_return if ([$redir[$encode($1)]]==[]) { notice $0 ERROR: $1 does not exist [tm]. }{ if ([$redir[$encode($1)]]!=[$encode($1)]) { notice $0 ERROR: $1 is aliased to $decode($redir[$encode($1)]). }{ @ function_return = encode($1) } } } on -ctcp "% % rel *" { if ( [$3] ){ if ([$5]==[]) { notice $0 Usage: REL }{ @ rela = checkvaliduser($0 $3) @ relb = checkvaliduser($0 $4) if ( ([$rela]==[]) || ([$relb]==[])) { ; }{ if ([$relc[$rela][$relb]]==[]) { ^assign rel[$rela][$relb] $5- ^assign relc[$rela][$relb] $0 $userhost() $time() ^assign rel[$relb][$rela] $5- ^assign relc[$relb][$rela] $0 $userhost() $time() notice $0 $decode($rela) with $decode($relb): $5- notice $3 $0 has added relation $5- between you and $4 notice $4 $0 has added relation $5- between you and $3 }{ notice $0 That rel is already set } } } }{ notice $0 checking your RELs... ^assign account $encode($0) foreach rel.$account ii { notice $0 with $decode($ii): $rel[$account][$ii] \(says $word(0 $relc[$account][$ii])\) } } } on -ctcp "% % reltypes" { foreach relt ii { ^assign -relt.$ii } foreach rel ii { foreach rel.$ii jj { ^assign relt.$encode($rel[$ii][$jj]) $rel[$ii][$jj] } } ^assign -tt foreach relt ii { ^assign tt $tt,$relt[$ii] } notice $0 Known types are: $tt } alias rels { foreach rel ii { foreach rel.$ii jj { echo $[8]decode($ii) -> $[8]decode($jj): \($[8]word(0 $relc[$ii][$jj])\) $rel[$ii][$jj] } } } alias delrel { echo *** Deleting rel $0 <-> $1 ^assign -rel.$encode($0).$encode($1) ^assign -relc.$encode($0).$encode($1) ^assign -rel.$encode($1).$encode($0) ^assign -relc.$encode($1).$encode($0) } alias ctcp.note { if ( [$3] ) { ctcp $0 note $max.tell note-value is now: $3. ^assign note[$account] $3 }{ ctcp $0 note $max.tell setting is: $note[$account]. } } alias ctcp.urlen { if ( [$3] ) { ctcp $0 urlen $max.tell urlen-value is now: $3. ^assign urlen[$account] $3 }{ ctcp $0 urlen $max.tell setting is: $urlen[$account]. } } alias ctcp.gender { if ( [$3] ) { ctcp $0 gender $max.tell gender is now: $3. ^assign gender[$account] $3 }{ ctcp $0 gender $max.tell setting is: $gender[$account]. } } alias ctcp.pw { if ( [$3] ) { on ^exec "pw %" notice $0 pw $max.tell Auth-key is now set to $$1 (this is your password b64 encoded).\;httpd.useradd $decode($account) $$1 on ^exec_exit "pw *" pw.off alias pw.off { on exec_exit -"pw *" on exec -"pw %" } ^exec -name pw echo -n '$strip(' $decode($account):$3)'|mmencode }{ ctcp $0 pw $max.tell setting is: $httpd.user.u[$account]. } } alias ctcp.topic { if ( [$3] != [] ) { ^assign -cc ^assign cc $3 @ cc = cc + 1 @ cc = stack.topic - cc if ( cc < 0 ){ @ cc = cc + 1 + 99 } ^assign cc $right(2 ${00 ## cc}) if ([$stack[topic][$cc]]){ notice $0 topic set $formattopic1($stack[topic][$cc]) notice $0 $formattopic2($stack[topic][$cc]) }{ notice $0 No such topic! } }{ ctcp.topic $0 $1 $2 0 } } alias formattopic1 { @ function_return = [by $1 at $stime($0):] } alias formattopic2 { @ function_return = [$3-] } alias ctcp.motd { if ( [$3] != [] ) { if ([$3]==[set]){ if ([$4]==[off]){ ^assign -motd[$account] }{ if ([$4]==[on]){ ^assign motd[$account] $ver.old }{ if ([$4]==[all]){ ^assign motd[$account] Start }}} if (![$motd[$account]]){ ctcp $0 motd $max.tell setting is: off. }{ ctcp $0 motd $max.tell setting is: on \($motd[$account]) } }{ if ([$3]==[on]) { ^notice $0 Perhaps you mean "motd SET on"? }{ if ( [$ver[$encode($3)][txt]] != [] ){ ^notice $0 $ver[$encode($3)][txt] }{ ^notice $0 There is no motd for Version $3. }}} }{ ctcp.motd $0 $1 $2 $line.vers } } on -ctcp "% % country *" { if ([$3]) { ^assign DOM $strip(. $3) if ([$country[$DOM]]){ ctcp $0 country .$DOM is $country[$DOM]\. }{ ctcp $0 country .$DOM is unknown to me. } ^assign -DOM }{ ctcp $0 error You must supply an argument. } } on -ctcp "% % mcd *" { mcd $0 $3- } on -ctcp "% % spell *" { if ([$3]) { ctcp $0 spell$spell($3-) }{ ctcp $0 error You must supply something to spell. } } on -ctcp "% % bs *" { ^exec -notice $0 /home/sec/.irc/bin/bullshit } on -ctcp "% % morse *" { if ([$3]) { ctcp $0 morse$morse($3-) }{ ctcp $0 error You must supply something to morse. } } on -ctcp "% % tla *" { if ([$3]) { ^assign DOM $3 if ([$tla[$DOM]]){ ctcp $0 tla $DOM: $tla[$DOM]\. }{ if ([$4]){ if ([$3]==[-p]){ quote privmsg $line.chan :$4: $tla[$4]\. }{ assign tla.$3 $4- assign ula.$3 from $0!$userhost() at $stime($time()) notice $0 Thanks, I added $DOM right now. } }{ notice $0 $DOM is unknown to me. If you find out what it means, notice $0 please submit it with /ctcp counter tla $DOM echo +++ $DOM unknown } } ^assign -DOM }{ ctcp $0 error You must supply an argument. } } on -ctcp "% % kfz *" { if ([$3]) { ^assign DOM $toupper($3) if ([$kfz[$DOM]]){ ctcp $0 kfz $DOM: $kfz[$DOM]\. }{ notice $0 $DOM probably doesn't exist. echo +++ $DOM unknown } ^assign -DOM }{ ctcp $0 error You must supply an argument. } } on -ctcp "% % remind *" { if ([$3]) { if ([$3]==[delete]) { rem.del $0 $4- }{ rem.make $0 $3- } }{ ctcp $0 error You must supply an argument. } } on -ctcp "% % tv *" { if ([$3]) { if ([$3]==[-p]) { ^exec -msg $line.chan /home/sec/.irc/bin/tv -counter $strip(&|!$$()<>;`'" $4-)|head -1 }{ ^exec -notice $0 /home/sec/.irc/bin/tv -counter $strip(&|!$$()<>;`'" $3-) } }{ ctcp $0 error You must supply an argument. } } on -ctcp "% % lang *" { if ([$3]) { if ([$3]==[-p]) { ^exec -msg $line.chan /home/sec/.irc/iso639/iso639 -counter '$strip(<>;`'" $3-)'|head -1 }{ ^exec -notice $0 /home/sec/.irc/iso639/iso639 -counter '$strip(<>;`'" $3-)' } }{ ctcp $0 error You must supply an argument. } } on -ctcp "% % kneip *" { if ([$3]) { if ([$3]==[-p]) { ^exec -msg $line.chan /home/sec/.irc/kneip/kneip.pl '$strip(<>;`'" $3-)'|head -1 }{ ^exec -notice $0 /home/sec/.irc/kneip/kneip.pl '$strip(<>;`'" $3-)' } }{ ctcp $0 error You must supply an argument. } } on -ctcp "% % idn *" { if ([$3]) { ^exec -notice $0 /home/sec/bin/IDN '$strip(<>;`'" $3-)' }{ ctcp $0 error You must supply an argument. } } on -ctcp "% % color *" { if ([$3]) { ^exec -notice $0 /home/sec/bin/rgb.pl '$strip(<>;`'" $3-)' }{ ctcp $0 error You must supply an argument. } } on -ctcp "% % wm *" { notice $0 This has been disabled # if ([$3]) { # ^exec -notice $0 /home/sec/.irc/bin/wm.ksh -c '$strip(<>;`'" $3-)' # }{ # ^exec -notice $0 /home/sec/.irc/bin/wm.ksh -c # } } on -ctcp "% % units *" { if ([$4]) { if ([$5]) { if ([$3]==[-p]) { ^exec -msg $line.chan echo '$strip(<>'`"; $6)' '$strip(<>'`"; $4)' = \$\( \(echo scale=5\;echo '$strip(<>'`"; $6)' `/usr/bin/units '$strip(<>;`'" $4)' '$strip(<>;`'" $5)'|tail -1`)|bc -l) '$strip(<>'`"; $5)' }{ ^exec -notice $0 echo '$strip(<>'`"; $5)' '$strip(<>'`"; $3)' = \$\( \(echo scale=5\;echo '$strip(<>'`"; $5)' `/usr/bin/units '$strip(<>;`'" $3)' '$strip(<>;`'" $4)'|tail -1`)|bc -l) '$strip(<>'`"; $4)' } }{ ^exec -notice $0 /usr/bin/units '$strip(<>;`'" $3)' '$strip(<>;`'" $4)' } }{ ctcp $0 error You must supply two arguments. } } on -ctcp "% % kurs *" { if ([$3]==[-p]) { ^exec -msg $line.chan /home/sec/.irc/bin/kurse -short -counter '$strip(<>;`'" $4-)'|head -1 }{ ^exec -notice $0 /home/sec/.irc/bin/kurse -counter X'$strip(<>;`'" $3-)' } } on -ctcp "% % tz *" { if ([$3]==[-p]) { ^exec -msg $line.chan /home/sec/bin/tz $strip(&|!$$<>;`'" $4-)|head -1 }{ ^exec -notice $0 /home/sec/bin/tz $strip(&|!$$<>;`'" $3-) } } on -ctcp "% % fb *" { if ([$3]) { ^exec -notice $0 /home/sec/.irc/bin/fb -counter $strip(&|!$$<>;`'" $3-) }{ ctcp $0 error You must supply an argument. } } on -ctcp "% % jargon *" { if ([$3]) { ^exec -notice $0 /home/sec/.irc/bin/jarg -c '$strip(<>;`'" $3-)' }{ ctcp $0 error You must supply an argument. } } on -ctcp "% % avon *" { if ([$3]==[]) { ctcp $0 error You must supply an argument. }{ ^exec -notice $0 /home/sec/.irc/bin/avon '$strip(<>;`'" $3-)'|expand -8 } } on -ctcp "% % http *" { if ([$3]==[]) { ctcp $0 error You must supply an argument. }{ if ([$3]==[-p]) { ^exec -msg $line.chan /home/sec/.irc/bin/http '$strip(<>;`'" $4-)' }{ ^exec -notice $0 /home/sec/.irc/bin/http '$strip(<>;`'" $3-)' } } } on -ctcp "% % apropos *" { if ([$3]==[]) { ctcp $0 error You must supply an argument. }{ if ([$3]==[-p]) { ^exec -msg $line.chan /usr/bin/apropos '$strip(<>;`'" $4-)'|head -2 }{ ^exec -notice $0 /usr/bin/apropos '$strip(<>;`'" $3-)' } } } on -ctcp "% % where *" { if ([$3]==[]) { ctcp $0 error You must supply an argument. }{ if ([$3]==[-p]) { ^exec -msg $line.chan /home/sec/.irc/bin/where '$strip(<>;`'" $4-)'|head -2 }{ if ([$3]==[-pp]) { ^exec -msg $line.chan /home/sec/.irc/bin/where '$strip(<>;`'" $4-)'|head -1 }{ ^exec -notice $0 /home/sec/.irc/bin/where '$strip(<>;`'" $3-)' } } } } on -ctcp "% % whatis *" { if ([$3]==[]) { ctcp $0 error You must supply an argument. }{ if ([$3]==[-p]) { ^exec -msg $line.chan /usr/bin/man -f '$strip(<>;`'" $4-)'|head -1 }{ ^exec -notice $0 /usr/bin/man -f '$strip(<>;`'" $3-)'|head -3 } } } on -ctcp "% % port *" { if ([$3]==[]) { ctcp $0 error You must supply an port name or number. }{ if ([$3]==[-p]) { ^exec -msg $line.chan /home/sec/.irc/bin/port '$strip(<>;`'" $4-)' }{ ^exec -notice $0 /home/sec/.irc/bin/port '$strip(<>;`'" $3-)' } } } on -ctcp "% % protocol *" { if ([$3]==[]) { ctcp $0 error You must supply a protocol name or number. }{ if ([$3]==[-p]) { ^exec -msg $line.chan /home/sec/.irc/bin/protocol '$strip(<>;`'" $4-)' }{ ^exec -notice $0 /home/sec/.irc/bin/protocol '$strip(<>;`'" $3-)' } } } on -ctcp "% % google *" { if ([$3]==[]) { ctcp $0 error You must supply an search string }{ if ([$3]==[-p]) { ^exec -msg $line.chan /home/sec/bin/google -s '$strip(<>;`'" $4-)' }{ ^exec -notice $0 /home/sec/bin/google '$strip(<>;`'" $3-)' } } } on -ctcp "% % rfc *" { if ([$3]==[]) { ctcp $0 error You must supply an search string }{ if ([$3]==[-p]) { ^exec -msg $line.chan /home/sec/.irc/bin/rfc -s '$strip(<>;`'" $4-)' }{ ^exec -notice $0 /home/sec/.irc/bin/rfc '$strip(<>;`'" $3-)' } } } on -ctcp "% % oui *" { if ([$3]==[]) { ctcp $0 error You must supply an vendor name or oui number }{ if ([$3]==[-p]) { ^exec -msg $line.chan /home/sec/.irc/bin/oui '$strip(<>;`'" $4-)' }{ ^exec -notice $0 /home/sec/.irc/bin/oui '$strip(<>;`'" $3-)' } } } on -ctcp "% % airport *" { if ([$3]==[]) { ctcp $0 error You must supply an airport name or 3-letter-code }{ if ([$3]==[-p]) { ^exec -msg $line.chan /home/sec/.irc/bin/airport '$strip(<>;`'" $4-)' }{ ^exec -notice $0 /home/sec/.irc/bin/airport '$strip(<>;`'" $3-)' } } } on -ctcp "% % iata *" { if ([$3]==[]) { ctcp $0 error You must supply an airline name or 2-letter-code }{ if ([$3]==[-p]) { ^exec -msg $line.chan /home/sec/.irc/bin/iata '$strip(<>;`'" $4-)' }{ ^exec -notice $0 /home/sec/.irc/bin/iata '$strip(<>;`'" $3-)' } } } on -ctcp "% % coord *" { if ([$3]==[]) { ctcp $0 error You must supply a city name (non-US) }{ if ([$3]==[-p]) { ^exec -msg $line.chan /home/sec/.irc/bin/gps '$strip(<>;`'" $4-)' }{ ^exec -notice $0 /home/sec/.irc/bin/gps '$strip(<>;`'" $3-)' } } } on -ctcp "% % roll *" { if ([$3]==[]) { ctcp $0 error You must supply some dice to roll }{ if ([$3]==[-p]) { ^exec -msg $line.chan /home/sec/bin/roll -counter '$strip(<>;`'" $4-)' }{ ^exec -notice $0 /home/sec/bin/roll '$strip(<>;`'" $3-)' } } } on -ctcp "% % dict *" { if ([$3]==[]) { ctcp $0 error You must supply an argument. }{ ^exec -notice $0 /home/sec/.irc/bin/dict -counter '$strip(<>;`'" $3-)' } } on -ctcp "% % dico *" { if ([$3]==[]) { ctcp $0 error You must supply an argument. }{ ^exec -notice $0 /home/sec/.irc/bin/dict -counter -fr '$strip(<>;`'" $3-)' } } on -ctcp "% % Bcal *" { ^exec -notice $0 /home/sec/bin/Bcal -counter '$strip(<>;`'" $3-)' } on -ctcp "% % sneak *" { if ([$3]==[]) { ctcp $0 error Command disabled. # ^exec -notice $0 /home/sec/.irc/bin/sneakcheck -r '$strip(<>;`'" $0)' }{ ctcp $0 error You must not supply an argument. } } on -ctcp "% % trenne *" { if ([$3]==[]) { ctcp $0 error You must supply an argument. }{ ^exec -notice $0 /home/sec/bin/trenne '$strip(<>;`'" $3-)' } } on -ctcp "% % ebay *" { if ([$3]==[]) { ctcp $0 error You must supply an argument. }{ if ([$4]==[]) { ^exec -notice $0 /home/sec/.irc/bin/ebay '$strip(<>;`'" $3)' }{ if ([$3]==[-p]) { ^exec -msg $line.chan /home/sec/.irc/bin/ebay '$strip(<>;`'" $4)' }{ ^exec -notice $0 /home/sec/.irc/bin/ebay '$strip(<>;`'" $3)' '$strip(<>;`'" $4)' } } } } on -ctcp "% % smiley *" { ^exec -notice $0 /usr/local/bin/smiley|head -1 } on -ctcp "% % mrcheck *" { if ([$3]==[]) { ctcp $0 error You must supply an argument. }{ ^exec -notice $0 /home/sec/.irc/bin/mrcheck -counter '$strip(<>;`'" $3-)' } } on -ctcp "% % fone *" { if ([$3]==[]) { ctcp $0 error You must supply an argument. }{ ^exec -notice $0 /home/sec/bin/fonefinder '$strip(<>;`'" $3-)' } } on -ctcp "% % np *" { if ([$3]==[]) { ctcp $0 error You must supply an argument. }{ ^exec -notice $0 /home/sec/bin/np -counter '$strip(<>;`'" $3-)' } } on -ctcp "% % cidr *" { if ([$3]==[]) { ctcp $0 error You must supply one or two arguments. }{ if ([$3]==[-p]) { ^exec -msg $line.chan /home/sec/bin/cidr '$strip(<>;`'" $4-)' }{ ^exec -notice $0 /home/sec/bin/cidr '$strip(<>;`'" $3-)' } } } on -ctcp "% % mvv *" { if ([$4]==[]) { ctcp $0 error You must supply at least 2 arguments. }{ ^assign -mvv.from ^assign -mvv.to ^assign -mvv.n if ([$3]==[alias]){ ^assign mvv.to $encode($tolower($4)) if ([$mvv[alias][$mvv.to]]==[]){ ^assign mvv.alias.$mvv.to $5 ^assign mvv.aliat.$mvv.to $0!$userhost() $stime($time()) } ^notice $0 $4 is aliased to $mvv[alias][$encode($tolower($4))] }{ if ( rmatch($3 +* .) ){ ^assign mvv.n 1 if ([$3]==[.]){ ^assign mvv.from $mvv[alias][$encode($tolower($0))] }{ ^assign mvv.from $mvv[alias][$encode($tolower($mid(1 99 $3)))] } }{ ^assign mvv.from $3 } if ( rmatch($4 +* .) ){ ^assign mvv.n 1 if ([$4]==[.]){ ^assign mvv.to $mvv[alias][$encode($tolower($0))] }{ ^assign mvv.to $mvv[alias][$encode($tolower($mid(1 99 $4)))] } }{ ^assign mvv.to $4 } if ([$mvv.n]){ ^notice $0 $3 [$mvv.from] -> $4 [$mvv.to] } # ^notice $0 '$strip(()!$$<>;`'" $mvv.from)' '$strip(()!$$<>;`'" $mvv.to)' $strip(|()!$$<>;`'" $5-) ^exec -notice $0 sudo -u axel /home/axel/export/webgate db '$strip(()!$$<>;`'" $mvv.from)' '$strip(()!$$<>;`'" $mvv.to)' $strip(&|()!$$<>;`'" $5-) } } } on -ctcp "% % bio *" { if ([$3]==[]) { ^exec -notice $0 /home/sec/.irc/bin/Bio -counter }{ ^exec -notice $0 /home/sec/.irc/bin/Bio -counter '$strip(|()!$$<>;`'" $3-)' } } on -ctcp "% % wetter.online *" { if ([$3]==[]) { ^exec -notice $0 /home/sec/.irc/bin/Wetter }{ ^exec -notice $0 /home/sec/.irc/bin/Wetter '$strip(|()!$$<>;`'" $3-)' } } on -ctcp "% % wetter.web *" { if ([$3]==[]) { ^exec -notice $0 /home/sec/.irc/bin/wetter }{ ^exec -notice $0 /home/sec/.irc/bin/wetter '$strip(()!$$<>;`'" $3)' } } on -ctcp "% % wetter *" { notice $0 Choose: wetter.web, wetter.online or bio } on -ctcp "% % plz *" { if ([$3]==[]) { ctcp $0 error You must supply an argument. }{ ^exec -notice $0 /home/sec/.irc/bin/plz '$strip(<>;`'" $3-)' } } on -ctcp "% % blz *" { if ([$3]==[]) { ctcp $0 error You must supply at least one argument. }{ ^exec -notice $0 /home/sec/.irc/bin/blz -counter '$strip(<>;`'" $3-)' } } on -ctcp "% % tel *" { if ([$3]==[]) { ctcp $0 error You must supply an argument. }{ ^exec -notice $0 /home/sec/bin/tname.pl -counter $strip(&|$$!()<>;`'" $3-) } } on -ctcp "% % rtel *" { if ([$3]==[]) { ctcp $0 error You must supply an argument. }{ ^exec -notice $0 /home/sec/bin/tnummer.pl -counter '$strip(<>;`'" $3)' '$strip(<>;`'" $4-)' } } on -ctcp "% % easter *" { if ([$3]==[]) { ^exec -notice $0 /usr/bin/ncal -e }{ ^exec -notice $0 /usr/bin/ncal -e '$strip(<>;`'" $3-)'|head -1 } } on -ctcp "% % termin *" { if ([$3]==[]) { ^exec -notice $0 /home/sec/bin/Bcal }{ if ([$3]==[-p]) { ^exec -msg $line.chan /home/sec/bin/Bcal '$strip(<>;`'" $4-)' }{ ^exec -notice $0 /home/sec/bin/Bcal '$strip(<>;`'" $3-)' } } } on -ctcp "% % pom" { if ([$3]==[-p]) { ^exec -msg $line.chan /usr/games/pom }{ ^exec -notice $0 /usr/games/pom } } on -ctcp "% % pwgen" { ^exec -notice $0 /usr/local/bin/pwgen -s 8 } on -ctcp "% % calc *" { if ([$3]==[]) { ctcp $0 error You must supply an argument. }{ if ([$3]==[-o]) { ^exec -notice $0 /bin/echo -n '<$strip(<>`'"! $4-)> '\;/bin/echo '$strip(<>`'" $4-)'|/usr/bin/sed 's/\;/ & /'|/usr/bin/bc -l|head -1 }{ if ([$3]==[-p]) { if ([$match($0 $chanusers($line.chan))] == [0]) { ctcp $0 error You are not on $line.chan\. }{ ^exec -msg $line.chan /bin/echo -n '[$0] <$strip(<>`'"! $4-)> '\;/bin/echo '$strip(<>`'" $4-)'|/usr/bin/sed 's/\;/ & /'|/usr/bin/bc -l|head -1 } }{ ^exec -notice $0 /bin/echo '$strip(<>`'" $3-)'|/usr/bin/bc } } } } on -ctcp "% % dc *" { if ([$3]==[]) { ctcp $0 error You must supply an argument. }{ if ([$3]==[-o]) { ^exec -notice $0 /bin/echo -n '<$strip(s<>`'"! $4-)> '\;/bin/echo '$strip(<>`'" $4-)'|/usr/bin/dc|head -1 }{ if ([$3]==[-p]) { if ([$match($0 $chanusers($line.chan))] == [0]) { ctcp $0 error You are not on $line.chan\. }{ ^exec -msg $line.chan /bin/echo '[$0] dc <$strip(s<>`'"! $4-)> = '`/bin/echo '$strip(<>`'" $4-)'|/usr/bin/dc|tail -1` } }{ ^exec -notice $0 /bin/echo '$strip(s<>`'"! $3-)'|/usr/bin/dc } } } } on -ctcp "% % uptime" { @ line.tdiff = time() - max.uptime ctcp $0 uptime I'm running for $tdiff($line.tdiff) } on -ctcp "% % admin" { ctcp $0 admin My master is Sec } on -ctcp "% % info" { ctcp $0 info Try 'HELP'. } on -ctcp "% % danke" { @ danke = rand(4) notice $0 $dank[$danke] ^assign -dank } ^assign dank.0 Keine Ursache. ^assign dank.1 Hab ich doch gern gemacht. ^assign dank.2 Danke auch. ^assign dank.3 Bin immer fuer dich da. on -ctcp "% % kw" { ^exec -notice $0 /bin/date +"Aktuelle KW ist %V" } on -ctcp "% % xyzzy" { notice $0 Nothing happens. } on -ctcp "% % time" { ctcp $0 time My local time is: } on -ctcp "% % clientinfo" { ctcp $0 clientinfo Who is interested in this? I suggest you use HELP or VERSION, but anyway } on -ctcp "% % version" { ctcp $0 version $line.verslong } on -ctcp "% % url" { if (listen[pnum]){ ctcp $0 url http://utfe.net:$listen[pnum]/ }{ ctcp $0 url Currently not at all. Hit the admin :-) } } # Only works with "urlcatcher" loaded and running on -ctcp "% % checkurl %" { ^assign cc 499 @ cnt = stack.url while ( cc > 0 ){ @ cc = cc - 1 if (cnt == 000){ @ cnt = 999 }{ ^assign cnt $right(3 ${000 ## cnt - 1}) } if ([$word(0 $stack[url][$cnt])] == [$3]) { @ myt = time() - word(1 $stack[url][$cnt]) @ cc = -1 notice $0 This url was mentioned$hms.do($myt) ago by $word(3 $stack[url][$cnt]). [$stime($word(1 $stack[url][$cnt]))] } } if ( cc == 0 ){ @ myt = time() - word(1 $stack[url][$cnt]) notice $0 Not seen in the last$hms.do($myt). [$stime($word(1 $stack[url][$cnt]))] } } on -ctcp "% % map" { ctcp $0 error Go type /quote map yourself. } on -ctcp "% % overview" { assign counter.to $0 ccu $line.chan asign -counter.to } # Hoeni-Geburtstags-alias, 15.3.02 on -ctcp "% % umlaut" { notice $0 ÄÖÜ äöü ß } on -ctcp "% % umlaute" { notice $0 ÄÖÜ äöü ß } on -ctcp "% % 8bit" { notice $0 àáâãäåæ ç èéêë ìíîï ñ òóôõöø ùúûü ýÿ notice $0 ÀÁÂÃÄÅÆ Ç ÈÉÊË ÌÍÎÏ Ñ ÒÓÔÕÖØ ÙÚÛÜ Ý notice $0 ¢£¤¥§¨ ®© ¬­¯º°ª ×µ¶¦´·¸ ¹²³ ¼½¾ »« ÷± ¿¡ ÐðÞþ ß } on -ctcp "% % oldhelp" { notice $0 I understand the following commands: notice $0 Statistical: STATS STAT NEXT PREV RANKS TOTAL OVERVIEW. notice $0 Configurational: ALIAS IGNORE UNIGNORE NOTE MOTD PW. notice $0 Informational: SEEN URL ADMIN TIME UPTIME VERSION TOPIC. notice $0 DB-like functions: COUNTRY TLA KFZ TV AVON PLZ JARGON FB TZ. notice $0 Gatways to DBs: UNITS DICT MRCHECK MVV KURS WETTER EBAY. notice $0 Other stuff: REMIND 8BIT UMLAUTE CALC EASTER POM SPELL notice $0 notice $0 HELP2 shows even more commands, HELP for more info. } on -ctcp "% % help" { if ([$3]) { notice $0 I have no help for "$3". Or my admin forgot to add help for it. notice $0 Try "HELP CONF" and "HELP DB" to list most commands. }{ notice $0 Hi $0, I am the $line.chan $N\. notice $0 notice $0 For help about my statistic functions or how to notice $0 configure my behaviour towards you see "HELP CONF" notice $0 notice $0 For help about my database-like query functions notice $0 or gateways to external databases see "HELP DB". notice $0 notice $0 Remeber: "HELP " shows more info on any command. } } on -ctcp "% % help conf" { notice $0 Info about me: URL ADMIN TIME UPTIME VERSION notice $0 Configure me: ALIAS IGNORE UNIGNORE NOTE MOTD URLEN GENDER notice $0 Query stats: STATS STAT NEXT PREV RANKS TOTAL notice $0 Info on $line.chan: TOPIC SEEN FIRSTSEEN OVERVIEW } on -ctcp "% % help db" { notice $0 DB gatways: DICT TV MVV WETTER MRCHECK UNITS EBAY GOOGLE NP notice $0 UNITS FONE KNEIP DICO BCAL notice $0 Local data: COUNTRY TLA KFZ AVON PLZ TLA KURS SPELL FB MORSE notice $0 PORT WHERE PROTOCOL OUI RFC WHATIS CIDR UMLAUTE notice $0 8BIT TRENNE EASTER POM TEL RTEL BLZ HTTP TZ URLCHECK notice $0 JARGON APROPOS MCD LANG COLOR AIRPORT IATA COORD notice $0 Other stuff: REMIND CALC BS KW XYZZY DC SMILEY REL DANKE PWGEN notice $0 RELTYPES TERMIN IDN ROLL # notice $0 Broken stuff: SNEAK WM } on -ctcp "% % help 8bit" { notice $0 Lists most 8bit characters (160-255) } on -ctcp "% % help umlaute" { notice $0 Lists german umlauts (iso8859-1) } on -ctcp "% % help admin" { notice $0 Lists the responsible person for this bot. } on -ctcp "% % help danke" { notice $0 Thank the $N\, or its admin. } on -ctcp "% % help total" { notice $0 Lists the totals for $line.chan\. } on -ctcp "% % help lines" { notice $0 Lists the amount of lines you said on $line.chan\. } on -ctcp "% % help ignore" { notice $0 Ignores you. Removes you from all further statistics. notice $0 Use UNIGNORE to continue statistics. } on -ctcp "% % help unignore" { notice $0 Unignores you. Gathers statistics on your Nickname. notice $0 Use IGNORE or ALIAS to modify behaviour. } on -ctcp "% % help note" { notice $0 "NOTE" shows whether you get notified when your rank changes. notice $0 "NOTE [on|off]" will change your setting. } on -ctcp "% % help motd" { notice $0 "MOTD [ver]" shows motd for current| Version. notice $0 "MOTD set [on|off]" sets automatic notices whenever the MOTD changes. } on -ctcp "% % help topic" { notice $0 "TOPIC" shows current topic for $line.chan notice $0 "TOPIC " shows the n'th last topic. } on -ctcp "% % help alias" { notice $0 "ALIAS" shows to which Nickname your Nick is aliased to. notice $0 "ALIAS " will alias your nick to . notice $0 You will then be accounted as . notice $0 WARNING: Case is significant. } on -ctcp "% % help words" { notice $0 Lists the amount of words you said on $line.chan\. } on -ctcp "% % help RANKS" { notice $0 Lists the current rankings on $line.chan\. notice $0 Use "WORDS" or "LINES" as additional parameter. notice $0 Note: It now only shows the top 10. } on -ctcp "% % help country" { notice $0 Translates a toplevel-domain into it's name. notice $0 p.ex. "country de" yields "GERMANY" } on -ctcp "% % help mcd" { notice $0 See if you won at McDonalds Monopoly. notice $0 Simply send your sticker numbers (e.g. "MCD m306 m322") } on -ctcp "% % help lang" { notice $0 Check iso639 (2 or 3 letter) language codes notice $0 "lang en" or "lang jpn" or even "lang german" } on -ctcp "% % help kneip" { notice $0 Gateway for http://www.kneipen-suche.com/ notice $0 try "kneip Seoul" or "kneip -long Seoul" } on -ctcp "% % help idn" { notice $0 Convert IDN Domains(punycode) forth and back notice $0 try "idn xn--mglich-wxa.de" or "idn täst.de" } on -ctcp "% % help color" { notice $0 Look up a color RGB value by name notice $0 try "color almond" } on -ctcp "% % help spell" { notice $0 Spell a phrase according to the international spelling alphabet. } on -ctcp "% % help bs" { notice $0 generate a executive management phrase a.k.a. bullshit } on -ctcp "% % help morse" { notice $0 Convert a Phrase into morse characters or vice versa. } on -ctcp "% % help tla" { notice $0 Translates a tla into it's expansion. notice $0 p.ex. "tla tla" yields "Three Letter Acronym" } on -ctcp "% % help kfz" { notice $0 Expands german car-plates. notice $0 p.ex. "kfz m" yields "München" } on -ctcp "% % help wm" { notice $0 This has been disabled # ^exec -notice $0 /home/sec/.irc/bin/wm.ksh -c -h } on -ctcp "% % help tv" { notice $0 Gateway to the tv database ^exec -notice $0 /home/sec/.irc/bin/tv -counter -help } on -ctcp "% % help units" { notice $0 Gateway to the units program. notice $0 Example: 'units cm in' or 'units cm in 210' } on -ctcp "% % help kurs" { ^exec -notice $0 /home/sec/.irc/bin/kurse -counter -help } on -ctcp "% % help tz" { ^exec -notice $0 /home/sec/bin/tz -help } on -ctcp "% % help fb" { notice $0 Searches in "Fachbegriffe der Informatik" notice $0 from http://www.iks-jena.de/mitarb/lutz/usenet/Fachbegriffe.der.Informatik.html notice $0 Example: 'fb Multimedia' or 'fb 4'. Use -e for exact searches. } on -ctcp "% % help jargon" { notice $0 Mini-Gateway to the jargon file (version 4.3.1). notice $0 Example: 'jargon foobar' } on -ctcp "% % help avon" { notice $0 Gateway to the avon database notice $0 Works Number->City and City(regexp)->Number notice $0 You can give the whole phone number, it will find the correct prefx. } on -ctcp "% % help http" { notice $0 Translates HTTP Protocol responses notice $0 Works Number->Name and Name(regexp)->Number } on -ctcp "% % help where" { notice $0 Where is the download site of a specific program notice $0 e.g. "WHERE netcat" } on -ctcp "% % help apropos" { notice $0 The unix 'apropos' command. } on -ctcp "% % help whatis" { notice $0 The 'whatis' header line of a manpage notice $0 e.g. "WHATIS jot" } on -ctcp "% % help port" { notice $0 Number to name or name to number lookup for tcp/udp ports } on -ctcp "% % help protocol" { notice $0 Number to name or name to number lookup for IP Protocols } on -ctcp "% % help google" { notice $0 Do a "I'm feeling lucky"-search on google. } on -ctcp "% % help rfc" { notice $0 Find an RFC title by number (also STD,BCP and FYIs) } on -ctcp "% % help oui" { notice $0 Look up an ethernet address in the official oui assignemnts notice $0 Syntax: "oui 00:C0:4A" (exactly three bytes required) notice $0 or "oui " (only first 4 hits returned) } on -ctcp "% % help airport" { notice $0 Look up an 3-letter Airport code notice $0 Syntax: "airport HAJ" (exactly three letters required) notice $0 or "airport Munich" (only first 3 hits returned) } on -ctcp "% % help iata" { notice $0 Look up an 2-letter Airline IATA code notice $0 Syntax: "iata LH" (exactly two letters required) notice $0 or "iata Lufthansa" (only first 4 hits returned) } on -ctcp "% % help coord" { notice $0 Look up WGS84 coordinates of a city (non US, DE preferred) notice $0 Syntax: "coord Berlin" } on -ctcp "% % help roll" { notice $0 Roll some dice. notice $0 Syntax: "roll 3d6 + d4" (3 six-sided dice and one 4-sided summed) } on -ctcp "% % help dict" { notice $0 Gateway to dict.leo.org (english/german) } on -ctcp "% % help dico" { notice $0 Gateway to dico.leo.org (french/german) } on -ctcp "% % help bcal" { notice $0 B calender. Mostly undocumented. :-/ } on -ctcp "% % help sneak" { notice $0 Tells you how many sneak tickets you orderd. } on -ctcp "% % help trenne" { notice $0 Shows german hyphenations (by Oliver Fromme ) } on -ctcp "% % help ebay" { notice $0 Short info on an E-Bay.de Item. Prepend -s for short. } on -ctcp "% % help smiley" { notice $0 Print a random smiley with explanation } on -ctcp "% % help mrcheck" { notice $0 Gateway to http://mr-check.xipolis.net/ } on -ctcp "% % help np" { notice $0 Gateway to http://www.numberingplans.com/ notice $0 Map phone number to country+city } on -ctcp "% % help fone" { notice $0 Gateway to http://www.primeris.com/fonefind/ notice $0 Map phone number to country+city } on -ctcp "% % help cidr" { notice $0 Do fancy things with IPs. notice $0 Try "127.1" or "192.168.18/20" or "10.11.12.13 .62" or even "/28" } on -ctcp "% % help mvv" { notice $0 Gateway to the hafas.bahn.de MVV database (by axel@schwabing.org) notice $0 from to [[ab|an] hh:mm] [datum] notice $0 Example 'mvv isartor bonner-platz' notice $0 for help about aliases see "help mvv alias" } on -ctcp "% % help mvv alias" { notice $0 "from" and "to" can be aliases: notice $0 "mvv alias Sec Isartor" sets an alias "Sec" for "Isartor" notice $0 "mvv . +ray" requests route from alias to alias ray } on -ctcp "% % help wetter" { notice $0 Multiple available, choose: wetter.web or wetter.online. } on -ctcp "% % help wetter.web" { notice $0 wetter.web [-wind] [cityname] days notice $0 city defaults to munich, days is a number 1-5, default=3 } on -ctcp "% % help wetter.online" { notice $0 Gateway to wetter-online.de notice $0 Use -1/-2/-3 as argument to limit the number of days notice $0 Use Magic numbers for other cities. (default=Muenchen) } on -ctcp "% % help bio" { notice $0 Gateway to biowetter from wetter-online.de notice $0 Currently only for Muenchen } on -ctcp "% % help plz" { notice $0 German PLZ to City converter. This database is quite old. } on -ctcp "% % help blz" { notice $0 German BLZ <-> Bankname converter. Database from 2002-09-02. notice $0 Try "BLZ Deutsche Bank 24, Mannheim" or "BLZ 70010080" } on -ctcp "% % help tel" { notice $0 Lookup a Munich Person by "last name" "further match" } on -ctcp "% % help rtel" { notice $0 Lookup a Munich Person by phone number. } on -ctcp "% % help easter" { notice $0 Print the date of easter on a given year } on -ctcp "% % help pom" { notice $0 Print the current phase of the moon. } on -ctcp "% % help pwgen" { notice $0 Randomly generates an 8-character password. } on -ctcp "% % help uptime" { notice $0 Shows how long the bot is running. Note, that this usually is notice $0 not the same period for which accounting is run. } on -ctcp "% % help stat" { notice $0 Shows some statistics about the person on the supplied rank. } on -ctcp "% % help stats" { notice $0 Shows some statistics about you (or, optionally the supplied nickname) } on -ctcp "% % help next" { notice $0 Shows how far you're away from the next rank } on -ctcp "% % help prev" { notice $0 Shows how far your pursuer is away from you } on -ctcp "% % help seen" { notice $0 Shows when the $N has last seen someone. } on -ctcp "% % help firstseen" { notice $0 Shows when the $N has first seen someone. } on -ctcp "% % help url" { notice $0 Shows with which URL my web-interface can be accessed. } on -ctcp "% % help checkurl" { notice $0 Checks if an URL has been recently mentioned. } on -ctcp "% % help urlen" { notice $0 "urlen on" makes URLs you say on $line.chan visible via the webinterface. notice $0 "urlen off" hides your URLs from public view. } on -ctcp "% % help gender" { notice $0 "gender " configures how the $N refers to you. notice $0 valid settings are "male", "female" and "neutral". if (! [$gender[$redir[$encode($0)]]]) { notice $0 Note: You didn't set your gender yet! } } on -ctcp "% % help pw" { notice $0 "pw " sets a new password to be used in the Webinterface. } on -ctcp "% % help overview" { notice $0 Shows short overview over the channel $line.chan } on -ctcp "% % help remind" { notice $0 remind 18:00 Go home - Send Message at that time. notice $0 remind delete 2 - Delete timer number 2 } on -ctcp "% % help calc" { notice $0 Uses bc to evaluate a mathematical statement. notice $0 '-o' as first parameter for one-line format. notice $0 '-p' to say it directly on $line.chan\. } on -ctcp "% % help dc" { notice $0 Uses dc to evaluate a mathematical statement. notice $0 '-o' as first parameter for one-line format. notice $0 '-p' to say it directly on $line.chan\. } on -ctcp "% % help rel" { notice $0 Enter Relations between people from $line.chan\. notice $0 rel enters something. notice $0 will both be notified if online. notice $0 rel (without parameter) dumps your part of the DB. } on -ctcp "% % help kw" { notice $0 Current week number ("Kalenderwoche") notice $0 conforming to ISO-8601 and DIN EN 28601 notice $0 First week of a year with 4 or more days is number 1. notice $0 For that purpose, a week starts with Monday. } on -ctcp "% % help termin" { notice $0 Current events / still Work in Progress notice $0 'dump /pattern/' to analyze notice $0 'new ' or 'edit /pattern/ ' to create/edit. notice $0 = any number of " " pairs notice $0 valid fields are: start_{minute,hour} end_{minute_hour} year month day description note } # Ignore some commonly used ctcp's on -ctcp ^"% % ACTION *" on #-ctcp 11 ^"% % ACTION *" on -ctcp ^"% % PING *" on -ctcp ^"% % CAST128ED-CBC *" on -ctcp ^"% % ECHO *" on -ctcp "% % *" { ctcp $0 error I don't understand "$2-". Maybe you should try HELP. } on #-ctcp 11 * { echo +++ $0!$userhost($0) requested $2- } # Don't even think about talkingt to those. #on ^raw_irc "ray!*" #on ^raw_irc "hoeni!*"