# CrazY script ################## scripts used here (&modified): morse, tabkey if ([$CrazY]==[]) {^assign CrazY 0.0.2deltaepsilon eval echo *** CRAZY script ${CrazY} is loading. ^assign firstload 1 } {eval echo *** CRAZY script is reloading.} if ([$E_I]!=[]||[$ex]!=[]||[$pk]!=[]||[$LicePath]!=[]||[$tbvers]!=[]||[$gg]!=[]||[$PRO.irc]!=[]||[$DV]!=[]) { echo *** WARNING! There is another script loaded. Please - RESTART IRC to use echo *** one of us. Probably none of us will work propertly in this configuration } load ~/IRC/aliases.irc ################################################## # public part - make your own modifications here ## ################################################### ################################################## # user definitions - needed ^assign userinfo No co pozeras? To som predsa ja! ^assign defnicks rura rurka potrubie ropovod ^assign pingreply PONG! ^assign autoaway_msg Ste tak potichu, az som z toho zaspal. # basic setup - needed too ^assign opfile ~/IRC/oplist ^assign deopfile ~/IRC/deoplist ^assign irclogfile ~/IRC/irclog.irc ^assign cwd ~/ ^assign user_shell /bin/tcsh ^assign user_shell_flags -c ^set -status_user3 ^assign notify_list V|X WWW ^assign special_notify_list Dedo assign cannot_op # private - not necessary alias z msg #z80 alias decef who decef.elf.stuba.sk alias timecmd {eval echo \*\*\* $wtime($time())} alias p ping alias hej say \\\\ hej /// hou :> alias sm savemsg ################################################## # END of public part, next is at the end of file ## ################################################### ################################################## #eval //mode $N +iw ^assign -$znami eval load $opfile eval load $deopfile ^assign selftimer 0 fec (01234567890123456789) w {timer -delete $w} fec (01234567890123456789) w {timer -delete $w} ^assign gateway 0 ^assign gwname Gateway ^assign -friendsa ^assign savemsg_switch 0 ^assign savemsg_count 0 ^assign away_switch 0 ^assign -savemsg_data ^assign selftimer 1 ^assign selfrnd 0 ^assign -last_dcc ^assign -notify_here ^assign -special_notify_here ^assign -notify_delta ^assign -notify_away ^notify - ^eval notify $notify_list $special_notify_list set log off set suppress_server_motd on set mail 1 set -status_user set -input_prompt set clock on set novice off set indent on set auto_whowas on set hold_mode off set continued_line set exec_protection off eval set shell $user_shell eval set shell_flags $user_shell_flags eval set logfile $irclogfile eval set user_information $userinfo eval set realname $userinfo set hide_private_channels off set show_who_hopcount on set show_status_all on set show_channel_names on set show_numerics off set max_recursions 1000 set client_information CRAZY client. Some q-stions ? set status_format [%R]%T %*%@%N%H%B%Q%A%C%+%I%O%M%U %W %X %Y%>%Z set beep_when_away 1 set show_away_once ON set input_protection off ^window name CRAZY ^on ^idle 6 { if ([$A] == []) { setaway $away_msg } } alias sctcp {^notice $0 $1- echo -> -$0\- CTCP $1 reply from $N: $2- } alias nick { if ([$N] != [$0]) {//nick $0} ^set input_prompt <$0> } if ([$A] != []) {away} alias m msg alias w whois alias wi whois alias whois { if ($gateway) {msg $gwname whois $0} //whois $0 if ([$1] != []) {whois $1-} } alias wtime { ^assign echo_temp $stime($time()) @ function_return = [$word(1 $echo_temp)] ## [ $word(2 $echo_temp) ] ## [$word(3 $echo_temp)] ^assign -echo_temp } alias q query alias n notice alias l who * alias ig {ignore $0 all;if ([$1] != []) {ig $1-}} alias cls clear alias reload load ~/.ircrc alias op { mode $C +oooo $0 $1 $2 $3 if ([$4] != []) {op $4-} } alias deop { mode $C -oooo $0 $1 $2 $3 if ([$4] != []) {op $4-} } alias dop deop alias setaway { if ([$savemsg_switch] == [0]) {savemsg on} if ([$0] != []) { mewall is away: $*. Messages will be saved. if ([$C] != []) {show_action $N $C is away: $*. Messages will be saved.} //away $* } { mewall is away... Messages will be saved. if ([$C] != []) {show_action $N $C is away... Messages will be saved.} //away manual setaway without specifying reason } echo *** Use /here or /back at return } alias back { if ([$A] != []) {away} if ([$0] == []) {mewall is back... if ([$C] != []) {show_action $N $C is back...} } {mewall is back: $* if ([$C] != []) {show_action $N $C is back: $*} } savemsg off if ([$savemsg_count] != [0]) {echo *** Use /showmsg and /delmsg, you have $savemsg_count messages} {showmsg} } alias here back alias mewall { if ([$C] != []) { ^assign mychans $mychannels() @ mychannr = 0 while (word($mychannr $mychans) != []) { //quote PRIVMSG $word($mychannr $mychans) :ACTION $* @ mychannr++ } ^assign -mychans ^assign -mychannr }} alias oops { ^assign oops_msg $B //msg $. prepac, to nebolo tebe... \;\) //msg $0 $oops_msg } alias by exit alias le leave alias de describe alias dt eval echo *** $wtime() *** alias nw { //window new server $0 channel $1 //nick $2 } alias kw { //window kill } alias yesnot { if (rmatch($0 y y* ano jes hej ok 1 a si igen on true h high cool great super chcem jasne)) {@ function_return = 1} {@ function_return = 0} } alias onoff { if ([$0] != [0]) {@function_return = [ON]} {@function_return = [OFF]} } alias awaymsg { ^assign savemsg_data[$savemsg_count] $* @ savemsg_count++ ^set status_user3 \[Msg: ${savemsg_count}\] } alias savemsg { if ([$0] != []) {^assign savemsg_switch $yesnot($0)} echo *** MSG saving is now $onoff($savemsg_switch) } alias delmsg { ^assign savemsg_count 0 ^assign -savemsg_data ^set -status_user3 } alias rmmsg delmsg alias showmsg { if ([$savemsg_count] == [0]) {echo *** You have NO messages..} { ^assign temp_show 0 ^assign temp_line 0 eval echo \*\*\* You have ${savemsg_count} messages.. while (temp_show < savemsg_count) { echo \[${1+temp_show}\] $savemsg_data[$temp_show] @ temp_show++ @ temp_line++ if ([$temp_line] > 15 && [$temp_show] != [$savemsg_count]) { ^assign temp_line $"[MORE/q/b/c]: " if ([$temp_line] == [c]) { clear } if ([$temp_line] == [b]) { @ temp_show = [$temp_show] - 32 if ([$temp_show] < 0) {^assign temp_show 0} } if ([$temp_line] == [q]) {^eval assign temp_show $savemsg_count}{echo \*\*\*} ^assign temp_line 0 } } ^assign -temp_show }} alias wrand { ^assign function_return $selfrnd @ selfrnd++ if ([$selfrnd] == [65536]) {^assign selfrnd 0} } alias msgtofile { if ([$iamsaving] != []) { echo *** WARNING! Attempt to write into 2 files at one time.. } { ^assign iamsaving $0 exec -name msgtof$wrand() echo '$1-' >> $0 wait # %msgtof$wrnd ^assign -iamsaving }} alias rmfile { exec -name rmf$wrand() if (-e $0) mv $0 $0~ #eval wait %rmf$wrnd wait if ([$1] != []) {rmfile $1-} } ^on ^send_public * echo <${N}> $1- ^on ^send_dcc * echo -> =$0= $1- ^on ^send_msg * echo <[$0]> $1- ^on ^send_action * echo * $N $1- ^on ^send_notice * echo -> -$0\- $1- ^on ^send_talk * echo +$N+ $1 alias checknick { ^assign function_return 0 ^assign checkn_tmp 0 while ([$word($checkn_tmp $*)] != []) { if (rmatch($word($checkn_tmp $*) *$N* *$N $N* $defnicks)) {^assign function_return 1} @ checkn_tmp++ } ^assign -checkn_tmp } alias names { if ([$0] != []) {//names $*} {/if (rmatch($C #*)) {//names $C} {echo *** You are not on channel. Specify channel name.}}} alias show_public { if ([$checknick($2-)] == [0]) {echo $prefix<$0> $2- if (right(4 $*) == [(mc)]) {echo *** MORSE message: $util.morsetrans($2-)} } {echo $prefix<$0> $2- if (right(4 $*) == [(mc)]) {echo *** MORSE message: $util.morsetrans($2-)} if ([$savemsg_switch] == [1]) {awaymsg $wtime() $prefix<$0> $2- if (right(4 $*) == [(mc)]) {awaymsg $wtime() *** MORSE message: $util.morsetrans($2-)} }}} alias show_public_other {if ([$checknick($2-)] == [0]) {echo $prefix<$0:$1> $2-} {echo $prefix<$0:$1> $2- if ([$savemsg_switch] == [1]) {awaymsg $wtime() $prefix<$0:$1> $2- }}} alias show_msg {echo $prefix\<[$0]>\ $1- if ([$savemsg_switch] == [1]) {awaymsg $wtime() $prefix*$0* $1- }} alias show_dcc_chat {echo $prefix=$0= $1- if ([$savemsg_switch] == [1]) {awaymsg $wtime() $prefix=$0= $1- }} alias show_dcc_talk {echo $prefix+$0+ $1- if ([$savemsg_switch] == [1]) {awaymsg $wtime() $prefix+$0+ $1- }} alias show_action { if ([$1]==[$C]) { if ([$checknick($2-)] == [0]) {echo $prefix* $0 $2-} {echo $prefix* $0 $2- if ([$savemsg_switch] == [1]) {awaymsg $wtime() $prefix* $0 $2-} } } { if (rmatch($1 #*)) { if ([$checknick($2-)] == [0]) {echo $prefix* $0:$1 $2-} {echo $prefix* $0:$1 $2- if ([$savemsg_switch] == [1]) {awaymsg $wtime() $prefix* $0:$1 $2-} } } { echo $prefix* $0\->$1 $2- if ([$savemsg_switch] == [1]) {awaymsg $wtime() $prefix* $0:$1 $2-} } } } alias show_public_msg {if ([$checknick($2-)] == [0]) {echo $prefix*$0\->$1* $2-}{echo $prefix*$0:$1* $2- if ([$savemsg_switch] == [1]) {awaymsg $wtime() $prefix*$0:$1* $2- }}} alias show_public_notice {if ([$checknick($2-)] == [0]) {echo $prefix\-$0\->$1\- $2-}{echo $prefix-$0\->$1\- $2- if ([$savemsg_switch] == [1]) {awaymsg $wtime() $prefix-$0\-$1\- $2- }}} alias show_msg_group {show_public_msg $*} alias show_notice {echo $prefix\-$0\- $1- if ([$savemsg_switch] == [1]) {awaymsg $wtime() $prefix\-$0\- $1- }} ^on ^public "*" { if ([$0]==[$gwname]) {^assign prefix G if ([$2] == [*]) {show_action $3 $1 $4-} { if ([$2] == [***]) {echo $prefix$2 $strip( $3 $4) $5-} { show_public $mid(1 999 $left(${rindex(W $strip( $2)W)-1} $strip( $2))) $1 $3- } } ^assign -prefix } {show_public $*} } ^on ^msg "*" {show_msg $*} ^on ^action "*" {show_action $*} ^on ^public_msg "*" {show_public_msg $*} ^on ^public_other "*" {show_public_other $*} ^on ^public_notice "*" {show_public_notice $*} ^on ^msg_group "*" {show_msg_group $*} ^on ^dcc_chat "*" {show_dcc_chat $*} ^on ^dcc_talk "*" {show_dcc_talk $*} ^on ^notice "*" {show_notice $*} ^on ^input "*" { if ([$[1]*]!=[$K]&&[$COMMAND_MODE]==[OFF]) { if ([$[1]0] == [$K]) {//sendline $0 $1-}{//sendline $*} } {//sendline $*} } alias dcc { if ([$0]==[chat]) {^tk.addmsg \=$1 $tk.msglist tk.removenick $1 silent ^assign last_dcc $1} //dcc $* } alias d dcc bind ^[ meta1 bind meta1-[ meta2 bind meta1-O meta2 bind meta2-A backward_history bind meta1-A backward_history bind meta2-B forward_history bind meta1-B forward_history bind meta2-C forward_character bind meta1-C forward_character bind meta2-D backward_character bind meta1-D backward_character bind meta2-P parse_command j cs bind meta2-Q parse_command j linux bind meta2-R parse_command j z80 bind meta1-P parse_command j cs bind meta1-Q parse_command j linux bind meta1-R parse_command j z80 bind ^x meta3 alias new_win window new HIDE;window swap last bind ^z stop_irc bind ^b self_insert bind ^w switch_channel # tabkey bind ^I parse_command ^tk.getmsg 1 $tk.msglist bind meta3-^x parse_command tk.delnick # mix bind meta3-c parse_command clear bind meta3-^c parse_command clear bind meta3-m parse_command showmsg bind meta3-d parse_command delmsg bind meta3-n parse_command notify + bind meta3-s parse_command if ([$savemsg_switch] == [0]) {savemsg on} {savemsg off} bind meta3-a parse_command setaway niekde nieco nejako na neurcity cas, hned som s5 \;\-\) alias ipname { ^assign ad1 $0 ^assign ad1 } on -ctcp "% % DCC CHAT *" { echo *** DCC CHAT request from $0: $ipname($5) $6 //dcc chat $0 ^tk.addmsg \=$0 $tk.msglist } on -ctcp "% % DCC SEND *" {//DCC GET $0 $mid(${rindex(/ $4)+1} 35 $4)} on -ctcp "% % UTC *" eval echo *** UTC $* *** $wtime() *** on -ctcp "% % TIME *" eval echo *** TIME $* *** $wtime() *** on -ctcp "% % ECHO *" eval echo *** ECHO $* *** $wtime() *** on -ctcp "% % FINGER *" eval echo *** FINGER $* *** $wtime() *** on -ctcp "% % VERSION *" eval echo *** VERSION $* *** $wtime() *** on -ctcp "% % USERINFO *" eval echo *** USERINFO $* *** $wtime() *** on -ctcp "% % CLIENTINFO *" eval echo *** CLIENTINFO $* *** $wtime() *** ^on ^mode "% % +o *" echo *** $0 opped $3 on $1 ^on ^mode "% % -o *" echo *** $0 deopped $3 on $1 ^on ^mode "% % +oo *" echo *** $0 opped $3 and $4 on $1 ^on ^mode "% % -oo *" echo *** $0 deopped $3 and $4 on $1 ^on ^mode "% % +ooo *" echo *** $0 mass-opped $3, $4 and $5 on $1 ^on ^mode "% % -ooo *" echo *** $0 mass-deopped $3, $4 and $5 on $1 ^on ^mode "% % +oooo *" echo *** $0 mass-opped $3, $4, $5 and $6 on $1 ^on ^mode "% % -oooo *" echo *** $0 mass-deopped $3, $4, $5 and $6 on $1 on -ctcp "% % PING *" { ^assign pingt1 $time() ^assign pingt2 $3 ^assign pingt3 ${((pingt1%3600)-(pingt2%3600))*2} if ([$left(1 $pingt3)] == [-]){assign pingt4 ${0-pingt3}}{assign pingt4 ${pingt3}} echo *** PING from $0 to $1 *** $wtime() *** $pingt4 seconds //quote NOTICE $0 :CrAzY ${pingreply} } #on ^raw_irc "%$% PRIVMSG % :PING**" # #on ^raw_irc "%;% PRIVMSG % :PING**" # #on ^raw_irc "% PRIVMSG % :PING**" { # if (rmatch($2 #*)) {/echo * $left($index(! $0) $0) pinged channel $2} # {/echo *** $left($index(! $0) $0) pinged you.} # ^notice $left($index(! $0) $0) PONG PING follows # ^notice $left($index(! $0) $0) PING $4- # ^notice $left($index(! $0) $0) PONG That was my PING reply. Enough? # } #on -timer "??:?0" eval echo *** $wtime() *** on -timer "??:01" if ([$S]==[]) { echo *** Reconnecting //server 0} on ^436 "*" { /echo *** $* *** $wtime() /echo *** Reconnecting ^timer 3 server 0 } on ^252 "*" # on ^254 "*" # on ^375 "*" # on ^372 "*" # on ^disconnect * { /eval echo *** DISCONNECTED from IRC server *** $stime($time) /echo *** Reconnecting ^timer 3 window server $S } on -window "% \*\*\* Use /SERVER to %onnect to a server" { /window goto $0 /echo *** Reconnecting *** $wtime() ^timer 3 window server $S } on dcc_connect "*" { eval echo *** Chat to $* estabilished ^assign -last_dcc } on ^notify_signoff "*" { if ([$0]==[$gwname]) {^assign gateway 0} if (rmatch($0 $special_notify_list)) {^assign special_notify_here $tk.removefroml($0 $special_notify_here) echo *** Signoff $0 *** $wtime() *** } {^assign notify_away $0 $notify_away ^assign notify_here $tk.removefroml($0 $notify_here) } } on ^signoff "*" { echo *** Signoff: $0 \($uprav($userhost())\) \($1-\) eval echo *** $wtime() *** if (rmatch($0 $special_notify_list)) {^assign special_notify_here $tk.removefroml($0 $special_notify_here)} {^assign notify_here $tk.removefroml($0 $notify_here)} if ([$0]==[$gwname]) {^assign gateway 0} } on ^notify_signon "*" { ^userhost $0 -CMD if ([$3]) { if ([$3] != []) { if ([$0]==[$gwname]) {^assign gateway 1} {if (rmatch($0 $special_notify_list)) {echo *** Signon $0!$uprav($3)@$4 ^assign special_notify_here $0!$uprav($3)@$4 $special_notify_here} {^assign notify_delta $0!$uprav($3)@$4 $notify_delta} } } {echo *** False signon, $0 is not here. if ([$0]==[$gwname]) {^assign gateway 0} } }} on ^raw_irc "% KICK % *" { ^assign kick_protect $4- #eval echo $kick_protect if ([$3] == [$N]) { eval echo *** $left($index(! $0) $0) \($uprav($mid(${index(! $0)+1} 999 $0))\) KICKED YOU\($N\) from $2 \($mid(1 999 $kick_protect)\) //quote JOIN :$2 } { eval echo *** $left($index(! $0) $0) \($uprav($mid(${index(! $0)+1} 999 $0))\) KICKED $3 from $2 \($mid(1 999 $kick_protect)\) } } # Pokus o AT alias at { if (rmatch($0 ??:?? ??:? ?:?? ?:?)) { ^assign timer_temp_array $0 if (rmatch($left($index(: $timer_temp_array) $timer_temp_array) ?)) {^assign timer_temp_array 0$timer_temp_array} if (rmatch($mid(${1+index(: $timer_temp_array)} 999 $timer_temp_array) ?)) {^assign timer_temp_array $left($index(: $timer_temp_array) $timer_temp_array):0$mid(${1+index(: $timer_temp_array)} 999 $timer_temp_array)} ^assign event$MID(0 2 $timer_temp_array)$MID(3 2 $timer_temp_array) $1- echo *** Command: "$1-" will be runned at $timer_temp_array ^on -timer "$timer_temp_array" { eval assign timer_temp_event \$\{event$MID(0 2 $0)$MID(3 2 $0)\} eval echo *** Timer activated at $0 with command: $timer_temp_event eval on timer - \$0 eval $timer_temp_event assign -event$MID(0 2 $0)$MID(3 2 $0) assign -timer_temp_event } ^assign -timer_temp_array } if (!rmatch($0 ??:?? ?:?? ??:? ?:?)) {echo *** Invalid time $0} } alias saveop {eval savelist znami OPlist $opfile $znami} # meno_listingu ludske_meno meno_fajlu cislo listing alias savelist_save { ^assign savelist_n $3 eval echo *** Saving $1, position $savelist_n - ${savelist_n + 7} to $2 msgtofile $2 @ $0 = \[$$$0 $4 $5 $6 $7 $8 $9 $10 $11 wait if ([$12] != []) {savelist_save $0 $1 $2 ${savelist_n + 8} $12-} ^assign -savelist_n if ([$3] == [1]) {eval echo *** $1 saved.} } # savelist meno_listingu ludske_meno meno_fajlu listing alias savelist { rmfile $2 wait msgtofile $2 ^assign -$0 wait savelist_save $0 $1 $2 1 $3- } alias uprav { if (([$left(1 $0)] == [\-])||([$left(1 $0)] == [~])||([$left(1 $0)] == [\+])) {@ function_return = [$mid(1 999 $0)]} {@ function_return = [$0]} } alias isinlist { if (rmatch($uprav($0) $1-)) {@ function_return = 1}{@ function_return = 0} } alias friend_do { if ([$0] == [@]) {echo *** $1 do not exist ^assign -friendsa } { if (isinlist($0 $znami)) {echo *** $1 already IS in your op-list ^assign -friendsa } { echo *** $1 is being added to your op-list ^assign znami $znami $uprav($0) saveop ^assign -friendsa } } } alias friend { if ([$friendsa] != []) { eval echo *** You are INSERTING friend $friendsa into your op-list, try later. } { if (index(@ $0) == -1) { ^assign friendsa $0 eval echo *** Looking for $0 userhost $0 -cmd friend_do \$3@\$4 $0 } { if (index(! $0) == -1) { ^assign friendsa $left($index(@ $0) $0) friend_do $0 $friendsa } {echo *** This oplist CANNOT handle full mask. Use log\?n@serve\*.sk instead.} } } } alias bk { userhost $0 -cmd if (1) { if ([$3] != []) { mode $C -o+b $0 *!*$mid(1 999 $uprav($3@$4)) }} wait if ([$1] != []) {//kick $C $*} {//kick $C $0 BAN-KICK!!!} } alias bankick bk alias bkick bk alias kick { if (rmatch($0 #*)) {//kick $*} {//kick $C $*} } alias join { if (rmatch($0 #*)) {//join $0} {//join #$0} if ([$1]) {join $1-} } alias leave { if ([$0]) { if (rmatch($0 #*)) {//quote PART $0 :$1-} {//quote PART #$0 :$1-} } { if ([$C]) {//quote PART $C} {echo *** You are not on any channel} } } alias finger {if ([$0]) { eval echo *** Fingering $0 if ([$index(@ $0)] != [-1]) { eval exec -name finger finger $0 wait %finger echo *** End of finger area } { ^userhost $0 -cmd if ([$3]) { if ([$3] != []) {exec -name finger finger $uprav($3@$4) wait %finger echo *** End of finger area} {eval echo *** Cannot find $0} } {eval echo *** Cannot find $0} }} {echo *** You have to specify nick(s) for finger} } ^on #^raw_irc 87 "% PART *" { ^assign logname $0 ^assign chname $2 ^assign quitext $3- ^assign nicname $left($index(! $logname) $logname) ^assign logname $uprav($mid(1 999 $mid($index(! $logname) 999 $logname))) if ([$quitext] == [:]) {^assign -quitext}{^assign quitext $mid(1 999 $quitext)} if ([$nicname]==[$gwname]) {^assign gateway 0} if ([$quitext] == [] || [$quitext] == [$nicname]) {^eval echo *** \$nicname\ \($logname\) has left channel $chname} {^eval echo *** \$nicname\ \($logname\) has left channel $chname \($quitext\)} ^assign -chname ^assign -quitext ^assign -nicname ^assign -logname } ^on ^join "*" { ^if ([$0]==[$gwname]) {^assign gateway 1} ^eval echo *** $0 \($uprav($userhost())\) has joined channel $1 ^if (ischanop($N $1) && isinlist($userhost() $znami) && !rmatch($1 $cannot_op)) {eval timer $rand(60) if \(!ischanop\($0 $1\)\) \{ //mode $1 +o $0 \}} } ^on ^leave "*" { ^if ([$0]==[$gwname]) {^assign gateway 0} } on -ctcp "% % NOP *" { echo *** OP service requested by $0 \($uprav($userhost())\) on $3 if (isinlist($userhost() $znami)) { if (ischanop($N $3)) { //mode $3 +o $0 echo *** OP service activated by $0 notice $0 You have been opped! } { echo *** Unable to OP $0... eval notice $0 Sorry, I am not OP on channel $3 or have CTCP NOP disabled. } } { eval echo *** $0 is not authorised. notice $0 Sorry, You're NOT in my auto-op list! } } ^assign sek none alias startx { ^assign sek 0 ^assign timersec timer 1 if (1) {@ sek++ ;eval ^set status_user1 \$sek ;eval \$timersec} eval $timersec } # Lagmeter eval set status_user L: ??? alias deltalag { timer 5 if (1) { if ([$lagmeasuring] != [0]) { ^eval set status_user L:$oldlag\($lagmeter\) @ lagmeter = lagmeter + 5 } { ^eval set status_user L:$oldlag } if ([$selftimer] == [1]) {deltalag} } } on -timer "*" { if ([$lagmeasuring] == [0]) {^assign lagmeter 0 eval ^assign pinglaunchtime $time()} /quote PING $time() $S ^assign lagmeasuring 1 if ([$notify_delta] != []) { ^assign notify_here $notify_delta $notify_here eval echo *** Signon $notify_delta ^assign -notify_delta } if ([$notify_away] != []) { eval echo *** Signoff $notify_away ^assign -notify_away } } on ^raw_irc "% PONG *" { if ([$0]==[$S]) { ^assign oldlag ${time()-pinglaunchtime} ^assign lagmeasuring 0 ^assign lagmeter 0 ^eval set status_user L:$oldlag } } ^assign lagmeasuring 1 ^assign lagmeter 0 ^assign oldlag ? eval ^assign pinglaunchtime $time() deltalag /eval quote PING $time() $S # TABKEY ---------------------------------------------------------------------- # Ctrl-X-X deletes the currently displayed or current nick from the list. # /addnick will add the nicknames to the list. # /nicklist will show the current list of names # original code by , modified by WWW alias nicklist echo *** Nickname List: $tk.msglist alias addnick if ([$1]) { addnick $1- };tk.addmsg $0 $tk.msglist @ tk.msgmax = 20 alias tk.addmsg { @ tk.matched = rmatch($0 $^\1-) if (tk.matched) { @ tk.msglist = [$(0-${tk.matched-1}) $(${tk.matched+1}-)] } #else { @ tk.msglist = [$(0-${tk.msgmax-1})] } @ tk.msgcnt = 0 ^assign -tk.matched } # searches thru list forwards or backwards. ($0==1==forward),($0==-1==back) alias tk.getmsg { @ tk.msgcnt = tk.msgcnt + [$0] if ( #tk.msglist < tk.msgcnt ) {@ tk.msgcnt = 1} if (tk.msgcnt <= 0) {@ tk.msgcnt = #tk.msglist} @ tk.junk = K ## [m] if ([$^^{[$($tk.msgcnt)]}] == []) {echo *** No nicks in tabkey list} {type ^U$tk.junk $^^{[$($tk.msgcnt) ] } } } ^on #^raw_irc 55 "% 401 *" { if ([$3] == [$last_dcc]) {^dcc close chat $3 ^tk.removenick \=$3 silent } ^tk.removenick $3 silent if ([$AUTO_WHOWAS] != [ON]) {^whowas $3} } ^on #^raw_irc 55 "% 406 *" { ^tk.removenick $1 silent } # Adds nick to list when message is sent or received. Doesn't effect output. on #-send_msg 55 * ^tk.addmsg $0 $tk.msglist on #-msg 55 * ^tk.addmsg $0 $tk.msglist on #-send_dcc_chat 55 * ^tk.addmsg \=$0 $tk.msglist on #-dcc_chat 55 * ^tk.addmsg \=$0 $tk.msglist on #-send_talk 55 * ^tk.addmsg \@$0 $tk.msglist on #-talk 55 * ^tk.addmsg \@$0 $tk.msglist # deletes current nick from list alias tk.delnick { if (tk.msgcnt == 0) { if ([$word(0 $tk.msglist)] == []) {echo *** No nick to delete} {echo *** Nickname $word(0 $tk.msglist) removed. @ tk.msglist = [$notword(1 $tk.msglist)]} } { if ([$word(${tk.msgcnt-1} $tk.msglist)] == []) {echo *** No nick specified} {echo *** Nickname $word(${tk.msgcnt-1} $tk.msglist) removed @ tk.msglist = [$notword($tk.msgcnt $tk.msglist)]} } type ^U } #deletes specified nick alias tk.removenick { ^assign rmnick_tmp 0 while ([$word($rmnick_tmp $tk.msglist)] != []) { if ([$word($rmnick_tmp $tk.msglist)] == [$0]) { if ([$1] != [silent]) {echo *** Nickname $word($rmnick_tmp $tk.msglist) removed} @ tk.msglist = [$notword(${rmnick_tmp+1} $tk.msglist)] } @ rmnick_tmp++ } ^assign -rmnick_tmp } alias tk.removefroml { ^assign rmlnick_tmp 1 ^assign function_return $1- while ([$word($rmlnick_tmp $1-)] != []) { if ([$word($rmlnick_tmp $1-)] == [$0]) { @ function_return = [$notword(${rmlnick_tmp+1} $1-)] } @ rmlnick_tmp++ } ^assign -rmlnick_tmp } alias notword { if ([$0] > 0) { if (([$0] > 1) && ([$0] < rmatch($~ $1-))) { @ nw.sep = [ ] } { @ nw.sep = [] } @ function_return = [$(1-${[$0]-1})] ## [$nw.sep] ## [$(${[$0]+1}-)] } {@ function_return = [$1-]} } @ null = [] @ MORSE.CODES = [._ _... _._. _.. . .._. __. .... .. .___ _._ ] @ MORSE.CODES = MORSE.CODES ## [._.. __ _. ___ .__. __._ ._. ... _ .._ ..._ ] @ MORSE.CODES = MORSE.CODES ## [.__ _.._ _.__ __.. .____ ..___ ...__ ...._ ] @ MORSE.CODES = MORSE.CODES ## [..... _.... __... ___.. ____. _____] @ MORSE.INDEX = [a b c d e f g h i j k l m n o p q r s t u v w x y z ] @ MORSE.INDEX = MORSE.INDEX ## [1 2 3 4 5 6 7 8 9 0] @ MORSE.REMOVE = [!@#$%^&*-=+`~;:'",/?\|] #^ON ^Raw_Irc "% PRIVMSG % :* (mc)" { # if (left(1 $2) == [#]) # { # if ([$2]==C) # { echo <$left($index(! $0) $0)> $strip(: $3) $4- } # { echo <$left($index(! $0) $0):$2> $strip(: $3) $4- } # } # { echo <=$left($index(! $0) $0)=> $strip(: $3) $4- } # echo MORSE CODE: $util.morsetrans($strip(: $3) $4-) #} alias util.morsetrans { # clears old morse code line... & reassigns @ morsecd = [] if ([$1] != [(mc)] && [$1] != []) { @ morsecd = util.morsetrans($1-) } @ mct.count = 0 @ mctwd = [$0] @ mctword = [] while (mct.count < @mctwd){ @ tempmct = [] while (mid($mct.count 1 $0) != [-] && mct.count < @mctwd) { @ tempmct = tempmct ## mid($mct.count 1 $0) @ mct.count = mct.count + 1 } @ mctindex = rmatch($tempmct $morse.codes) - 1 if (mctindex >= 0) { @ mctword = mctword ## word($mctindex $morse.index) } { if (tempmct != [-]) { @ mctword = mctword ## tempmct } } @ mct.count = mct.count + 1 } @ function_return = mctword ## [ ] ## morsecd } alias util.morsecode { # clears old morse code line... & reassigns @ morsecode = [] if ([$1] != [$1000]) { @ morsecode = util.morsecode($1-) } @ mc.count = 0 @ mcwd = strip( $0) @ mcword = [] @ mcsep = [] while (mc.count < @mcwd){ @ tempmc = mid($mc.count 1 $mcwd) @ mc.count = mc.count + 1 @ mcindex = rmatch($tempmc $morse.index) - 1 if (mcindex >= 0) { @ mcword = mcword ## mcsep ## word($mcindex $morse.codes) } { if (tempmc != [.] && tempmc != [_] && tempmc != [-]) { @ mcword = mcword ## [-] ## tempmc } } @ mcsep = [-] } @ function_return = mcword ## [ ] ## morsecode } alias morse { say $util.morsecode($*) (mc) } alias mmorse { msg $0 $util.morsecode($1-) (mc) } eval nick $N eval cd $cwd ##################################################### # public part II - make your own modifications here ## ###################################################### ##################################################### # private load ~/IRC/SplitII.irc ##################################################### # END of public part II ## ###################################################### ##################################################### ^assign -firstload ^parse refresh_screen echo *** CRAZY script is loaded. # eof