########################################################################### # Brett's Epic Script ########################################################################### ^assign version $Revision: 1.98 $ # -=- Begin Options (these are defaults, put your own settings in ~/.bjp.irc.opt) -=- ^assign timestamping ON ^assign logfile_timestamping ON ^assign double_status_current_window ON ^assign hhmmss ON ^assign matchwords Brett git oi bastard Beer Bar lunch food ^assign tab_nick_complete ON ^assign tab_nick_complete_verbose ON ^assign log_location ~/irc/logs ^assign irc_logging OFF ^assign partial_nick_complete OFF ^assign fixed_length_nicks OFF ^assign fixed_length -9 ^assign set_titlebar_to_channel_name OFF # And the place to store files that we get over dcc... ^set dcc_store_path ~/irc/downloads ########################################################################### # Colors # 0=white 1=black, 2=blue, 3=darkgreen, 4=red, 5=brown, 6=darkpurple, # 7=orange, 8=yellow, 9=green, 10=darkcyan, 11=cyan, 12=lightblue, # 13=purple, 14=darkgrey, 15=lightgrey ########################################################################### ^assign topiccolor 9 ^assign nickcolor 0 ^assign mynickcolor 11 ^assign timestampcolor 4 ^assign joincolor 3 ^assign leavecolor 4 ^assign information 15 ^assign motdcolor 8 ^assign whoiscolor 10 ^assign awaycolor 12 ^assign status_bg 2 ^assign status_fg 11 ^assign errorcolor 7 ^assign modechangecolor 8 ^assign wallopcolor 15 ########################################################################### # End color selection ########################################################################### # Random quit messages, one of these will be picked at load time of the script eval $setitem(quit_messages 0 Bye) eval $setitem(quit_messages 1 Back to reality) eval $setitem(quit_messages 2 Gone!) eval $setitem(quit_messages 3 Outta here) eval $setitem(quit_messages 4 Arggggghhhh! I hate mondays!) eval $setitem(quit_messages 5 Is it me or is it cold in here) # -=- End Options -=- # I suggest not editing below here unless you know what you are doing ;) If you # do spot a bug or nicer way of doing something then feel free to mail me, # brettp@users.sourceforge.net ^set mirc_broken_dcc_resume ON if ([$@dcc_store_path] < 1) { ^set dcc_store_path ~/irc/downloads } if ([$fexist(~/.bjp.irc.opt)]==[1]) { echo loading your options load ~/.bjp.irc.opt } ^set STATUS_USER |-=-{EPIC4+bjp.irc}-=-| alias openLogFile { ^assign server_name $0 ^assign log_name $1 ^assign log_filename $2 ^assign log_date $strftime(%d_%m_%Y) @filename = [$log_location] @filename #= [/irc.log.] @filename #= [$log_date] @filename #= [.] @filename #= [$server_name] @filename #= [.] @filename #= [$log_filename] @filedescriptor = open($filename W) ^assign log_file.[$server_name][$log_name] $filedescriptor } # code to write to a log file, or open a new one if the old one doesn't exist. alias writeToLog { ^assign server_name $0 ^assign log_filename $1 ^assign log_name $1 ^assign server_name $takeoutnastys($server_name) ^assign log_name $takeoutnastys($log_name) unless ( [$#log_file.[$server_name][$log_name]] > 0 ) { openLogFile $server_name $log_name $log_filename } $write($log_file.[$server_name][$log_name] $stripc($tr(///$logfiletimestamp()$2-))) } alias takeoutnastys { ^assign convertstring $0- @convertedstring = [$convertstring] @convertedstring = [$sar(ig/¾/threequarters/$convertedstring)] @convertedstring = [$sar(ig/¼/onequarted/$convertedstring)] @convertedstring = [$sar(ig/³/cube/$convertedstring)] @convertedstring = [$sar(ig/½/half/$convertedstring)] @convertedstring = [$sar(ig/²/square/$convertedstring)] @convertedstring = [$sar(ig/#/hash/$convertedstring)] @convertedstring = [$sar(ig/`/backtick/$convertedstring)] @convertedstring = [$sar(ig/-/minus/$convertedstring)] @convertedstring = [$sar(ig/+/plus/$convertedstring)] @convertedstring = [$sar(ig/=/equals/$convertedstring)] @convertedstring = [$sar(ig/%/percent/$convertedstring)] @convertedstring = [$sar(ig/|/pipe/$convertedstring)] @convertedstring = [$sar(ig/!/exclaimation_mark/$convertedstring)] @convertedstring = [$sar(ig/&/ampersand/$convertedstring)] return $convertedstring } alias directoryexists { ^assign tempdir $0 ^assign tempfile $tempdir/.tmp.dir.check.bjp.irc if (fexist($tempdir)==[1]) { if ((unlink($tempfile)!=0)&&(fexist($tempfile)==1)) { @return_value = -1 } { ^assign tempfd $open($tempfile W) if (!tempfd) { @return_value = -1 } { @return_value = 1 if (close($tempfd)) { @return_value = 1 } } } } { @return_value = -1 } ^assign -tempfile ^assign -tempfd return $return_value } alias get_window_width { @win_geometry = [$geom()] @win_geometry = [$word(0 $win_geometry)] return $win_geometry } ########################################################################### # Key Bindings ########################################################################### bind \ep parse_command ^part $C $L bind \er parse_command ^msg_last bind \eR parse_command ^window_last_msg if (tab_nick_complete == [ON]) { bind ^I parse_command ^nick_comp } { bind ^I parse_command ^msg_last } bind \e1 parse_command ^window swap 1;^window refnum 1 bind \e2 parse_command ^window swap 2;^window refnum 2 bind \e3 parse_command ^window swap 3;^window refnum 3 bind \e4 parse_command ^window swap 4;^window refnum 4 bind \e5 parse_command ^window swap 5;^window refnum 5 bind \e6 parse_command ^window swap 6;^window refnum 6 bind \e7 parse_command ^window swap 7;^window refnum 7 bind \e8 parse_command ^window swap 8;^window refnum 8 bind \e9 parse_command ^window swap 9;^window refnum 9 bind \eq parse_command ^window last bind \ew parse_command ^window next bind \eb parse_command ^window balance bind \ek parse_command ^window kill bind \en parse_command ^window new bind \e= parse_command ^window grow 1 bind \e- parse_command ^window shrink 1 bind \eh parse_command ^window hide bind \el parse_command ^lock_window ########################################################################### # End Key Bindings ########################################################################### ########################################################################### # Aliases ########################################################################### alias wn { window new window hide window swap last } alias get_version { @numchars = [$@version] @numchars -= 11 @temp = [$right($numchars $version)] @numchars -= 2 @temp = [$left($numchars $temp)] return $temp; } alias settitle { if (set_titlebar_to_channel_name == [ON]) { xecho -r $chr(27)]2\;$get_title()$chr(7) } setstatus $status_fg $status_bg } alias get_title { if ([$#T] > 0) { if ( [$#topics.[$left(24 $S)][$takeoutnastys($C)]] > 0 ) { @templength = [$get_window_width()] @templength -= [$@T] @templength -= [$@S] @templength -= 8 @topic = [$topics.[$left(24 $S)][$takeoutnastys($C)]] @topic = [$left($templength $topic)] @topic = [$sar(g/;/\\;/$topic)] @title = [${T} - $topic - ${S}] } { @title = [${T} - ${S}] } } { @title = [${S}] } return $title } alias echo { //echo $timestamp()$0- } alias lookup { echo $0 is $convert($0) } alias reverse { sendline $reversereturn($0-) } alias reverseecho { echo $reversereturn($0-) } alias reversereturn { @text = [$0-] @numchars = [$@text] @reversed = [] while (numchars>=0) { @reversed #= [$mid($numchars 1 $text)] @numchars -= 1 } return $reversed } alias colour { @coloured = [$colourreturn($0-)] sendline $coloured } alias colourreturn { @text = [$0-] @numchars = [$@text] @char = [0] @startcolour = [2] @endcolour = [14] @colour = [$startcolour] @coloured = [] while (char<=numchars) { @coloured #= [${colour}$mid($char 1 $text)] @char += 1 if (colour[$@0])) { sendline $0- } { ^assign -nic.chanusers @nic.chanusers = [$chanusers($C)] @nic.which = [$match($left($index(":," $0) $0)* $nic.chanusers)] @nic.got = [$word(${nic.which-1} $nic.chanusers)] if ([$nic.got]!=[]) { sendline $nic.got$nicfillchar $1- } { sendline $0- } } } set input_protection on } ############################################################### # End Of Nick Completion Code # ############################################################### ############################################################### # Cool Bit of nick completion code to do tab complete - # # this should be considered beta - any damage done is not # # my fault dammit ;) # ############################################################### alias nick_comp { @pos = curpos() if ($pos<$@L) { while ([$mid($pos 1 $L)]!=[ ]) { @pos = pos + 1 } } @beginningOfLine = [$left($pos $L)] @endOfLine = [$right(${@L-pos} $L)] @nickBegin = [$word(${#beginningOfLine-1} $beginningOfLine)] @beginningOfLine = [$left(${@beginningOfLine-@nickBegin} $beginningOfLine)] ^assign -nic.chanusers @nic.chanusers = [$chanusers($C)] @nic.which = [$pattern(${nickBegin}* $nic.chanusers)] if ([$numwords($nic.which)] > 1 && tab_nick_complete_verbose == [ON]) { xecho -banner -current -- ${information}There is more than one nick on this channel that starts $prefix($nic.which) xecho -banner -current -- ${information}Start of nicks xecho -banner -current -- ${information}$nic.which xecho -banner -current -- ${information}End of nicks } if ([$numwords($nic.which)] == 1) { xtype $beginningOfLine$nic.which$endOfLine @pos = 0 while (pos < [$@endOfLine]) { xtype OD @pos = pos + 1 } } { @nickPatternPrefix = [$prefix($nic.which)] if ( [$@nickPatternPrefix] > [$@nickBegin] ) { xtype $beginningOfLine$prefix($nic.which)$endOfLine @pos = 0 while (pos < [$@endOfLine]) { xtype OD @pos = pos + 1 } } } if ([$numwords($nic.which)] < 1) { xecho -banner -current -- Sorry - no one with a nick beginning $nickBegin is on this channel. } } ############################################################### # End Cool Nick Complete # ############################################################### ############################################################### # Bit of code to check if one of the words in the match list # # has been typed # ############################################################### alias checkformatch { @strippedtext = [$tr(/!?¿"\]\[//$0-)] @strippedtext = [$strip(':.,;> $strippedtext)] if ([$match(${N} $strippedtext)]) { return 1 } @currentword = 0 while ( currentword < [$#matchwords] ) { if ([$match($word($currentword ${matchwords}) $strippedtext)]) { return 1 } @currentword = currentword + 1 } return 0 } ########################################################################### # End Matchwords Code ########################################################################### ########################################################################### # Window Locking ########################################################################### alias islocked { if ([$match($0 $locked_windows)]) { return 1 } { return 0 } } alias lock_window { if ([$islocked($winnum())]) { $unlock($winnum()) } { $lock($winnum()) } } alias lock { if ([${locked_windows}]) { ^assign locked_windows $insertw(1 $0 ${locked_windows}) echo window $0 locked } { ^assign locked_windows $0 echo window $0 locked } } alias unlock { if ([$remw($0 ${locked_windows})]) { ^assign locked_windows $remw($0 ${locked_windows}) echo window $0 unlocked } { ^assign -locked_windows echo window $0 unlocked } } ############################################################### # End Window Locking ############################################################### ############################################################### # Server messages ############################################################### # RPL_MOTD on ^372 "*" { echo ${motdcolor}$1- } # RPL_MOTDSTART on ^375 "*" { echo ${motdcolor}--+-- $1- --+-- } # RPL_ENDOFMOTD on ^376 "*" { echo ${motdcolor}--+-- $1- --+-- } #RPL_WHOISUSER on ^311 "*" { echo -=-${whoiscolor} $1 is $2\@$3 $4- } #RPL_WHOISSERVER on ^312 "*" { echo -=-${whoiscolor} $1- } #RPL_WHOISOPERATOR on ^313 "*" { echo -=-${whoiscolor} $1- } #RPL_WHOISIDLE on ^317 "*" { echo -=-${whoiscolor} $1 signed on at $stime($3) has been idle for $tdiff($2) } #RPL_ENDOFWHOIS on ^318 "*" { echo -=-${whoiscolor} $1- } #RPL_WHOISCHANNELS on ^319 "*" { echo -=-${whoiscolor} $1- } #RPL_WHOWASUSER on ^314 "*" { echo -=-${whoiscolor} $1 was $2\@$3 $4- } #RPL_ENDOFWHOWAS on ^369 "*" { echo -=-${whoiscolor} $1- } #RPL_WHOREPLY on ^352 "*" { echo -=-${whoiscolor} $1 $2 is $3\@$4 $6- on server $5 } #RPL_ENDOFWHO on ^315 "*" { echo -=-${whoiscolor} $1- } #RPL_NAMREPLY on ^353 "*" { echo -=-${whoiscolor} $2- } #RPL_ENDOFNAMES on ^366 "*" { echo -=-${whoiscolor} $1- } #RPL_AWAY on ^301 "*" { echo -=-${awaycolor} $0- } #RPL_NOWAWAY on ^306 "*" { echo -=-${awaycolor} $1- } #RPL_UNAWAY on ^305 "*" { echo -=-${awaycolor} $1- } on ^disconnect "*" { foreach log_file.[$0] name { close($log_file.[$0][$name]) -assign log_file.[$0][$name] } } on ^server_notice "*" { echo \($0\) -=- $2- -=- } on ^server_lost "*" { echo \($1\) -=- $2- -=- } on ^wallop "*" { echo \($0\) -=- ${wallopcolor}$1 -> $2- } on ^mode "*" { if ( [$1] == N ) { echo -=- ${modechangecolor}User mode changed $1: $2- } { echo -=- ${modechangecolor}Channel mode changed for $1 by $0: $2- } } on ^notice "*" { if (fixed_length_nicks==[ON]) { echo \(Notice\) ${mynickcolor}$[$fixed_length]0| $1- } { echo \(Notice\) ${mynickcolor}\<$0\> $1- } } on ^send_notice "*" { if (fixed_length_nicks==[ON]) { echo \(Notice\)>${mynickcolor}$[$fixed_length]0| $1- } { echo \(Notice\)>${mynickcolor}\<$0\> $1- } } ############################################################### # Code used for public messages ############################################################### on ^join "*" { echo -=- $joincolor $0 \($2\) has joined $1  -=- if ([$1]==[$C]) { settitle } if (irc_logging==[ON]) { writeToLog $S $1 -=- $0 \($2\) has joined $1 -=- } } on ^leave * { if ([$0]==[$N]) { echo -=-$leavecolor You have left channel $1 because \($3-\) -=- } { echo -=- $leavecolor $0 \($2\) has left $1 because \($3-\) -=- } if (irc_logging==[ON]) { writeToLog $S $1 -=- $0 \($2\) has left $1 because \($3-\) -=- } if ([$1]==[$C]) { settitle } } # RPL_NOTOPIC on ^331 * { echo -=-${topiccolor} channel $1 does not have a topic -assign topics.[$left(24 $S)][$takeoutnasties($1))] settitle if (irc_logging==[ON]) { writeToLog $S $1 -=- channel $1 does not have a topic } } # RPL_TOPIC on ^332 * { echo -=-${topiccolor} the topic for $1 is $2- assign topics.[$left(24 $S)][$takeoutnastys($1)] $stripc($tr(###$2-)) settitle if (irc_logging==[ON]) { writeToLog $S $1 -=- the topic for $1 is $2- } } # ANOTHER TOPICY THING. on ^333 * { echo -=-${topiccolor} the topic was set by $2 and has been set for $tdiff(${time()-[$3]}) if (irc_logging==[ON]) { writeToLog $S $C -=- the topic was set by $2 and has been set for $tdiff(${time()-[$3]}) } } on ^channel_signoff "*" { echo -=-$leavecolor $1 has signed off \($2-\) -=- if ([$S]==[$0]) { settitle } if (irc_logging==[ON]) { writeToLog $S $C -=- $1 has signed off \($2-\) -=- } } on ^kill "*" { echo -=-$leavecolor $1 was killed from $0 by $2 \($4-\) -=- } on ^signoff "*" { echo -=-$leavecolor $1 has signed off \($2-\) -=- } on ^note "*" { echo (Note) $0 sent a note saying \"$2-\" at $1 if (irc_logging==[ON]) { # logging code to go here. } } on ^public "*" { if ( checkformatch($2-) ) { if (fixed_length_nicks==[ON]) { echo ${mynickcolor}$[$fixed_length]0| $2- } { echo ${mynickcolor}\<$0\> $2- } } { if (fixed_length_nicks==[ON]) { echo ${nickcolor}$[$fixed_length]0| $2- } { echo ${nickcolor}\<$0\> $2- } } if (irc_logging==[ON]) { writeToLog $S $1 \<$0\> $2- } } on ^public_other * { if ( checkformatch($2-) ) { if (fixed_length_nicks==[ON]) { echo ${mynickcolor}$[$fixed_length]0| $2- } { echo ${mynickcolor}\<$0\> $2- } } { if (fixed_length_nicks==[ON]) { echo $[8]1 ${nickcolor}$[$fixed_length]0| $2- } { echo $[8]1 ${nickcolor}\<$0\> $2- } } if (irc_logging==[ON]) { writeToLog $S $1 \<$0\> $2- } } on ^send_public * { if ([$0]==[$C]) { if (fixed_length_nicks == [ON]) { echo ${mynickcolor}$[$fixed_length]N| $1- } { echo ${mynickcolor}\<${N}\> $1- } } { if (fixed_length_nicks == [ON]) { echo $[8]0 ${mynickcolor}$[$fixed_length]N| $1- } { echo $[8]0 ${mynickcolor}\<${N}\> $1- } } if (irc_logging==[ON]) { writeToLog $S $0 \<$N\> $1- } } ############################################################### # End public # ############################################################### ############################################################### # Window switching code # ############################################################### on ^switch_windows * { if ([$islocked($1)]) { if ([$winvisible($1)]==[0]) { window swap $1 echo This window is locked. return } { if ([$double_status_current_window]==[ON]) { window $1 double on window $3 double off } settitle } } { if ([$double_status_current_window]==[ON]) { if ([$winvisible($1)]==[1]) { window $1 double off } window $3 double on } settitle } } ############################################################### # End Window switching code # ############################################################### ############################################################### # DCCs # ############################################################### on ^dcc_chat "*" { if (fixed_length_nicks == [ON]) { echo (DCC) ${nickcolor}$[$fixed_length]0| $1- } { echo (DCC) ${nickcolor}\<$0\> $1- } if (irc_logging==[ON]) { writeToLog $N $0 (DCC) \<$0\> $1- } } on ^send_dcc_chat "*" { if (fixed_length_nicks == [ON]) { echo (DCC)>${mynickcolor}$[$fixed_length]0| $1- } { echo (DCC)>${mynickcolor}\<$0\> $1- } if (irc_logging==[ON]) { writeToLog $N $0 (DCC)>\<$0\> $1- } } on ^dcc_connect "*" { echo <-=-> DCC $1 Connection to $0 \($2:$3\) Established if ( [$1] == [send] ) echo <-=-> Transfering $4 \($5 bytes\) } on ^dcc_offer "*" { if ( [$1] == [send] ) { echo <-=-> DCC SEND offer of $2 to $0 } { echo <-=-> Offering DCC CHAT to $0 } } on ^dcc_request "*" { if ( [$1] == [send] ) { echo <-=-> File $5 \($6 bytes\) offered by $0 \($3:$4\) } { echo <-=-> DCC Chat offered by $0 } } on ^dcc_lost "*" { if ( $match(GET $1-) > 0 ) { if ( $match(COMPLETE $2-) > 0 ) { echo <-=-> File $2 succesfully recieved from $0 } { echo <-=-> DCC Session $1 with $0 lost \($1-\) } } elsif ( $match(SEND $1-) > 0 ) { if ( $match(COMPLETE $2-) > 0 ) { echo <-=-> File $2 succesfully sent to $0 } { echo <-=-> DCC Session $1 with $0 lost \($1-\) } } { echo <-=-> DCC Conection with $0 lost \($1-\) } } ############################################################### # End DCCs # ############################################################### alias msg_last { @line = $L type /msg $, $L } alias window_last_msg { @windowid=[$querywin($,)] if ([$windowid]==[-1]) { window new query $, window hide window swap $querywin($,) } { window swap $windowid window refnum $querywin($,) } } ############################################################### # Nick changing code # ############################################################### on ^channel_nick "*" { if ( [$0] == [$C] ) { if ( [$1] == [$N] ) { echo 3 -=- You are now known as $2 -=- } { echo 3 -=- $1 is now known as $2 -=- @windowid=[$querywin($1)] if ([$windowid]!=[-1]) { window $querywin($1) query $2 } } } { if ( [$1] == [$N] ) { echo 3 -=- You are now known as $2 -=- } { echo 3 -=- $1 is now known as $2 -=- @windowid=[$querywin($1)] if ([$windowid]!=[-1]) { window $querywin($1) query $2 } } } if (irc_logging==[ON]) { writeToLog $S $C -=- $1 is now known as $2 -=- } } ############################################################### # End nick change # ############################################################### ############################################################### # Topic change and msg's # ############################################################### on ^topic "*" { echo -=-${topiccolor} $0 changed the topic on $1 to $2- -=- assign topics.[$left(24 $S)][$takeoutnastys($1)] $stripc($tr(###$2-)) settitle if (irc_logging==[ON]) { writeToLog $S $1 -=- $0 changed the topic on $1 to $2- -=- } } on ^msg "*" { if (checkformatch($1-)) { if (fixed_length_nicks == [ON]) { echo (Private) ${mynickcolor} $[$fixed_length]0| $1- } { echo (Private) ${mynickcolor}\<$0\> $1- } } { if (fixed_length_nicks == [ON]) { echo (Private) ${nickcolor} $[$fixed_length]0| $1- } { echo (Private) ${nickcolor}\<$0\> $1- } } if (irc_logging==[ON]) { writeToLog $N $0 (Private) \<$0\> $1- } } on ^send_msg "*" { if (fixed_length_nicks == [ON]) { echo (Private) >${mynickcolor}$[$fixed_length]0| $1- } { echo (Private) >${mynickcolor}\<$0\> $1- } if (irc_logging==[ON]) { writeToLog $N $0 (Private) >\<$0\> $1- } } ############################################################### # End topic and msg's ############################################################### ############################################################### # Action code - this *works* - don't break it ;) ############################################################### on ^action * { switch ( $1 ) { ( $N ) { if (checkformatch($2-)) { echo (Private) ${mynickcolor}* $0 $2- } { echo (Private) ${nickcolor}* $0 $2- } } ( $C ) { if (checkformatch($2-)) { echo ${mynickcolor}* $0 $2- } { echo ${nickcolor}* $0 $2- } } ( * ) { if ([$chanwin($winchan($1))]==[$1]) { if (checkformatch($2-)) { echo ${mynickcolor}* $0 $2- } { echo ${nickcolor}* $0 $2- } } { if (checkformatch($2-)) { echo ${mynickcolor}* $0/$1 $2- } { echo ${nickcolor}* $0/$1 $2- } } } } if (irc_logging==[ON]) { switch ( $1 ) { ( $N ) { writeToLog $N $0 (Private) * $0 $2- } ( $C ) { writeToLog $S $C * $0 $2- } ( * ) { writeToLog $S $1 * $0 $2- } } } } ################################################################ # End of action ################################################################ on ^send_action * { if ([$0]==[$C]) { echo ${mynickcolor}* ${N} $1- } { echo --> $0: ${mynickcolor}* $N $1- } if (irc_logging==[ON]) { if ([$0]==[$C]) { writeToLog $S $C * $N $1- } { writeToLog $N $0 --> $0: * $N $1- } } } if (timestamping == [ON]) { if (hhmmss == [ON]) { alias timestamp { return ${timestampcolor}[$word(3 $stime($time()))] } } { alias timestamp { return ${timestampcolor}[$strip(APMapm $Z)] } } } { alias timestamp { return } } if (logfile_timestamping == [ON]) { if (hhmmss == [ON]) { alias logfiletimestamp { return [$word(3 $stime($time()))] } } { alias logfiletimestamp { return [$strip(APMapm $Z)] } } } { alias logfiletimestamp { return } } alias setstatus (fg, bg) { ^set DISPLAY OFF set STATUS_FORMAT ${fg},${bg}%T [%R] %*%=%@%N%#%S%H%B%Q%A%C%+%I%O%M%F%L %D %U %W eval set STATUS_FORMAT1 ${fg},${bg} $get_title() set STATUS_FORMAT2 ${fg},${bg}%T [%R] %*%=%@%N%#%S%H%B%Q%A%+%I%O%M%F%L %D %U %W ^set DISPLAY ON } alias get_quit_message { @number_items = [$numitems(quit_messages)] $srand($time()) @randNumber = [$rand($number_items)] @this_quit_message = [$getitem(quit_messages $randNumber)] return $this_quit_message } ^set CLOCK_FORMAT %H:%M ^set DISPLAY OFF ^set BANNER $timestamp()-=- ^set BANNER_EXPAND ON ^set DISPLAY ON eval ^set CLIENT_INFORMATION Brett's IRC Script v$get_version(). Get it from http://www.sommitrealweird.co.uk/epic.html eval ^set QUIT_MESSAGE $get_quit_message() - \(bjp.irc v$get_version()\) if ([$directoryexists($dcc_store_path)]==[-1]) { echo the current value of dcc_store_path is not a directory. echo setting default dcc save path to current directory. ^set dcc_store_path . } if ([$double_status_current_window]==[ON]) { ^window new ^window kill } eval setstatus $status_fg $status_bg eval echo Brett's IRC Script $get_version() Loaded. if (irc_logging==[ON]) { eval echo IRC Logging is enabled, logs will be written to $log_location }