### Color scheme v3.2 ### Written by DJHyperbyte # # Changes in 3.2: # - Fixed a bug where you could get 6 windows when you reloaded the script # - Added different status bars for different windows # # This script (changes) colors (of): # - Status bar # - Input bar # - Default XECHO banner # - Paste command output # - MOTD (621) # - Join/leave notifications # - Hotlist signon/signoff # - Scan output # - List output # - Channel messages # - Channel operator messages # - Private messages # - Most common server messages # - Server links map (10112) # - Banlist (616) # - Admin CVersion (10118) # - Getlinespeed return (601) # # Features: # - Auto-rejoin when kicked... /set auto_rejoin on # - Beeps when someone says your name or messages you... /colors beep # - Changed layout of the status bar # - Changed Scan Layout # - Client Usage Statistics command... /admin cversion # - Double line status bar # - Leave/part commands wait for part message from the server (401) # - Nickname turns yellow when someone says your name # - Redirect request support (821) # - Saves settings # - Timestamping... /timestamp # - Topic command gets topic from the server instead of from the client # - Turns displaying of the MOTD on by default # # Notes: # - You can specify a file where settings should be saved to below: assign COLORS.SAVEFILE ~/colors.sav ## DEFAULT SETTINGS ## ## You do not have to change anything below this line. ## You can easily modify the settings with the /colors command assign COLORS.TIME.FMT %H:%M assign COLORS.TIME.STAT 1 assign COLORS.BEEP 1 ## LOAD SAVEFILE ## alias COLORS.LOAD { if (fexist($COLORS.SAVEFILE) != 1) { COLORS.SAVE } @:sv=open($COLORS.SAVEFILE r) while (!eof($sv)) { @:COLORS.LINE=read($sv) switch ($word(0 $COLORS.LINE)) { (COLORS.BEEP) { assign $COLORS.LINE } (COLORS.OPER) { assign $COLORS.LINE } (COLORS.TIME.FMT) { assign $COLORS.LINE } (COLORS.TIME.STAT) { assign $COLORS.LINE } } } @close($sv) } ## SAVE SAVEFILE ## alias COLORS.SAVE { if (fexist($COLORS.SAVEFILE) == 1) { @unlink($COLORS.SAVEFILE) } @sv = open($COLORS.SAVEFILE w) @write($sv COLORS.BEEP $COLORS.BEEP) @write($sv COLORS.OPER $COLORS.OPER) @write($sv COLORS.TIME.FMT $COLORS.TIME.FMT) @write($sv COLORS.TIME.FMT $COLORS.TIME.FMT) @write($sv COLORS.TIME.STAT $COLORS.TIME.STAT) @close($sv) } colors.load ^window double on ^set input_prompt 10ÀÄ>-1 $C14: ^set names_columns 3 ^set names_nickcolor 5- %21s-1 ^set search_format 16Ä> 15%f 7%b 12%t 13%L 9%N8%n ^set show_numerics_str 3-9=16>-1 ^set status_channel %C ^set status_format1 10ÚÄ[15%h16%N10(15%V10)]Ä[15%C16:15%c10]Ä[15%L10]Ä-14- - %>%Q ^set status_format2 10Ã[15%T10]Ä[16%S10]Ä[15%s10]Ä14Ä- - %>15%d 10[15%W%H%B%F10] ^set status_hold 15ÄÄ more ÄÄ ^set status_hold_lines 10(16%B10) ^set status_notify 15Win: 16%F ^set status_query 10Ä[15Query10: 16%Q10] ^set status_server %S ^set status_stats 15%s10/15%s10/15%s ^set status_window 8^^ ^set suppress_server_motd off if (COLORS.OPER && !COLORS.LOADED) { window new level server status_format1 "10Ä[16Server10]ÄÄÄÄÄ14Ä10ÄÄ14ÄÄÄ10Ä14ÄÄ ÄÄ Ä -" window new level msgs,wall status_format1 "10Ä[16Private10]ÄÄÄ14Ä10Ä14ÄÄ10Ä14ÄÄ Ä -" window -refnum 1 alias win1 { window -refnum 1 } alias win2 { window -refnum 2 } alias win3 { window -refnum 3 } } ## COLORS COMMAND ## alias colors { switch ($0) { (beep) { switch ($1) { (on) { ^assign COLORS.BEEP 1 } (off) { ^assign COLORS.BEEP 0 } (*) { ^assign COLORS.BEEP ${COLORS.BEEP ? 0 : 1} } xecho -b Beeping was turned ${COLORS.BEEP ? [ON] : [OFF]} colors.save } } (timestamp) { timestamp $1- } (operview) { ^assign COLORS.OPER ${COLORS.OPER ? 0 : 1} xecho -b OperView was turned ${COLORS.OPER ? [ON] : [OFF]} colors.save if (COLORS.OPER) { ^window new level server status_format1 "10Ä[16Server10]ÄÄÄÄÄ14Ä10ÄÄ14ÄÄÄ10Ä14ÄÄ ÄÄ Ä -" ^window new level msgs,wall status_format1 "10Ä[16Private10]ÄÄÄ14Ä10Ä14ÄÄ10Ä14ÄÄ Ä -" ^window -refnum 1 ^alias win1 { window -refnum 1 } ^alias win2 { window -refnum 2 } ^alias win3 { window -refnum 3 } }{ ^window -refnum 3 ^window -kill ^window -refnum 2 ^window -kill ^window -refnum 1 ^window level all } } (*) { xecho -b Options: /colors beep - /colors timestamp - /colors operview } } } ## TIMESTAMP COMMAND ## alias timestamp { switch ($0) { (on) { ^assign COLORS.TIME.STAT 1 colors.save xecho -b Timestamping has been turned ON. } (off) { ^assign COLORS.TIME.STAT 0 colors.save xecho -b Timestamping has been turned OFF. } (format) { if ([$1]) { if ([$1] == [-help]) { xecho -b %a -> the locale's abbreviated weekday name. xecho -b %A -> the locale's full weekday name. xecho -b %b -> the locale's abbreviated month name. xecho -b %B -> the locale's full month name. xecho -b %c -> the locale's appropriate date and time representation. xecho -b %C -> the century number (the year divided by 100 and truncated to an integer) as a decimal number [00-99]. xecho -b %d -> the day of the month as a decimal number [01,31]. xecho -b %D -> same as %m/%d/%y. xecho -b %e -> the day of the month as a decimal number [1,31]. A single digit is preceded by a space. xecho -b %h -> same as %b. xecho -b %H -> the hour (24-hour clock) as a decimal number [00,23]. xecho -b %I -> the hour (12-hour clock) as a decimal number [01,12]. xecho -b %j -> the day of the year as a decimal number [001,366]. xecho -b %m -> the month as a decimal number [01,12]. xecho -b %M -> the minute as a decimal number [00,59]. xecho -b %n -> a newline character. xecho -b %p -> the locale's equivalent of either a.m. or p.m. xecho -b %r -> the time in a.m. and p.m. notation. In the POSIX locale this is equivalent to %I:%M:%S %p. xecho -b %R -> the time in 24 hour notation (%H:%M). xecho -b %S -> the second as a decimal number [00,61]. xecho -b %t -> a tab character. xecho -b %T -> the time (%H:%M:%S). xecho -b %u -> the weekday as a decimal number [1,7], with 1 representing Monday. xecho -b %U -> the week number of the year (Sunday as the first day of the week) as a decimal number [00,53]. xecho -b %V -> the week number of the year (Monday as the first day of the week) as a decimal number [01,53]. If the week containing 1 January has four or more days in the new year, then it is considered week 1. Otherwise, it is the last week of the previous year, and the next week is week 1. xecho -b %w -> the weekday as a decimal number [0,6], with 0 representing Sunday. xecho -b %W -> the week number of the year (Monday as the first day of the week) as a decimal number [00,53]. All days in a new year preceding the first Monday are considered to be in week 0. xecho -b %x -> the locale's appropriate date representation. xecho -b %X -> the locale's appropriate time representation. xecho -b %y -> the year without century as a decimal number [00,99]. xecho -b %Y -> the year with century as a decimal number. xecho -b %Z -> the timezone name or abbreviation, or by no bytes if no timezone information exists. xecho -b %% -> %. xecho -b The default format is %H:%M }{ ^assign COLORS.TIME.FMT $1- colors.save xecho -b Timestamp format updated to: $strftime($1-) \($1-\) } }{ xecho -b With this function you can define the STRFTime format that the script should use. For more information on the STRFTime format for the timestamp, type /timestamp format -help } } (*) { xecho -b Invalid timestamp function. xecho -b Syntax: /timestamp on / off / format } } } ## PUBLIC ## on ^public "*" { if ([$0] == N) { xecho $cparse(%r>%R>%w$0%R<%r<) $2- }{ if (match(*$N* $2-)) { xecho $cparse(%b<%B<%Y$0%B>%b>) $2- if (COLORS.BEEP) { beep } }{ xecho $cparse(%b<%B<%w$0%B>%b>) $2- } } } on ^public_other "*" { if ([$0] == N) { xecho $cparse(%r>%R>%w$0%R/%W$1%R<%r<) $2- }{ if (match(*$N* $2-)) { xecho $cparse(%b<%B<%Y$0%B/%W$1%B>%b>) $2- if (COLORS.BEEP) { beep } }{ xecho $cparse(%b<%B<%w$0%B/%W$1%B>%b>) $2- } } } ## EMOTE ## on ^action "*" { if ([$0] == C) { if ([$1] == N) { xecho $cparse(%r*%R* %W$1) $2- }{ if (match(*$N* $2-)) { xecho $cparse(%b*%B* %Y$1) $2- if (COLORS.BEEP) { beep } }{ xecho $cparse(%b*%B* %W$1) $2- } } }{ if ([$1] == N) { xecho $cparse(%r*%R* %W$0%R:%W$1) $2- }{ if (match(*$N* $2-)) { xecho $cparse(%b*%B* %Y$0%B:%W$1) $2- if (COLORS.BEEP) { beep } }{ xecho $cparse(%b*%B* %W$0%B:%W$1) $2- } } } } ## JOIN ## on ^join "*" { xecho 3 * 9$1 3- 9$_getlinespeed($3)3/Sharing 9$2 3files - has joined channel 9$0 } on ^channel_join "*" { xecho $cparse(%K-%w=%W>) Joined channel16 $* } ## LEAVE ## on ^leave "*" { if ([$0] != N) { xecho 4 * 7$1 4- 7$_getlinespeed($3)4/Sharing 7$2 4files - has left channel 7$0 }{ xecho 4 * 7You 4have left channel 7$1 if (AUTO_REJOIN == [ON]) { join $1 } } } alias leave { ^//leave $0- } alias l { ^//leave $0- } alias part { ^//part $0- } on #^401 1 "*" { xecho $cparse(%K-%w=%W>) You have parted channel16 $0- } ## PASTE ## alias paste { ^assign COLORS.NEWPASTE 1 //paste $* } on ^paste "*" { if (COLORS.NEWPASTE) { @colors.pasteline = 1 ^assign -COLORS.NEWPASTE }{ @colors.pasteline++ } raw 402 $0 14[16$colors.pasteline14]-1 $1- } ## PRIVATE MESSAGE ## on ^send_msg "*" { xecho $cparse(%K[%r-%R=%W>%K\(%R$0%K\)]) $1- } on ^msg "*" { xecho $cparse(%K[%W<%P=%p-%K\(%P$0%K\)]) $1- if (COLORS.BEEP) { beep } } ## OPSAY ## on ^wall "*" { if ([$0] == N) { xecho $cparse($0 %K-%w=%W> %w$1) $2- }{ xecho $cparse($0 %W<%w=%K- %w$1) $2- } } ## HOTLIST ## on ^hotlist "*" { if ([$1] == [OFF]) { xecho $cparse(%r-%r=%W> %wHOTLIST: $0 signed OFF.) }{ xecho $cparse(%g-%g=%W> %wHOTLIST: $0%K\(%w$_getlinespeed($1)%K\)%w signed ON.) } } ## GETLINESPEED ## alias linespeed { raw 600 $0- } alias getlinespeed { raw 600 $0- } on ^601 "*" { xecho -b $cparse(%WL%wine%WS%wpeed) $0$cparse(%K:) $_getlinespeed($1) \($1\) } ## BANLIST ## on ^616 "*" { xecho $cparse(%Y$0 %w$1 %Y$2) } ## MOTD ## on ^621 "*" { if (SUPPRESS_SERVER_MOTD == [OFF]) { xecho $cparse(%GMOTD%g:) $* } } ## REDIRECT COMMAND ## on ^821 "*" { xecho $cparse(%r-%R=%W>) You were requested to connect to $0-. } ## LIST COMMAND ## on ^828 "*" { if (!COLORS.CHANLIST) { assign COLORS.CHANLIST 1 xecho 16Channel 14³ 16Users 14³ 16Reg'd 14³ 16Level 14³ 16Limit 14³ 16Topic-1 xecho 14ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄ-1 } xecho $[14]0 14³ 15$[5]1 14³ 15$[5]{[$2] ? [No] : [Yes]} 14³ 15$[5]3 14³ 15$[5]4 14³ 15$[18]5...-1 } on ^827 "*" { assign -COLORS.CHANLIST } ## ADMIN LINKS ## on ^10112 "*" { if ([$0]) { if (!COLORS.SERVERS.CNT) { assign COLORS.SERVERS.CNT $0 $2 } if (!rmatch($0 $COLORS.SERVERS.CNT)) { assign COLORS.SERVERS.CNT $COLORS.SERVERS.CNT $0 } if (!rmatch($2 $COLORS.SERVERS.CNT)) { assign COLORS.SERVERS.CNT $COLORS.SERVERS.CNT $2 } xecho $cparse(%W$left(1 $0)%w$rest(1 $0) %K-%w=%W> %W$left(1 $2)%w$rest(1 $2) %K\(%W$4%K\)) }{ xecho $cparse(%K-%w=%W> %WE%wnd of server map. Total of %W$numwords($COLORS.SERVERS.CNT) %wservers.) assign -COLORS.SERVERS.CNT } } ## ADMIN CVERSION ## on ^10118 "*" { if ([$0]) { if ([$1] >= [$COLORS.MOST_USED]) { assign COLORS.MOST_USED $1 assign COLORS.CLIENT_NAME $0 } assign COLORS.TOTAL_CLIENTS ${COLORS.TOTAL_CLIENTS + 1} switch ($1) { (1) { xecho 9$word(0 $0) 15is used 8$1 15time. } (*) { xecho 9$word(0 $0) 15is used 8$1 15times. } } }{ xecho 15- 12There are 8$COLORS.TOTAL_CLIENTS 12different clients on this server. xecho 15- 12Client 9$word(0 $COLORS.CLIENT_NAME) 12is used most, with 8$COLORS.MOST_USED 12times. assign -COLORS.TOTAL_CLIENTS assign -COLORS.MOST_USED assign -COLORS.CLIENT_NAME } } ## TOPIC ## alias topic (chan, newtopic) { if (match($chan $onchannels())) { raw 410 $chan $newtopic }{ raw 410 $C $newtopic } } on ^topic "*" { xecho -b $cparse(%wTopic for %W$0%w:) $1- } ## TIMESTAMPS ## on ^window "*" { if (COLORS.TIME.STAT) { xecho -w $0 $strftime($COLORS.TIME.FMT)3:-1 $1- }{ xecho -w $* } } ## SERVER MESSAGES ## on ^servermsg "% killed *:*" { xecho $cparse(%b-%B=%W>) $* } on ^servermsg "Server % killed *" { xecho $cparse(%b-%b=%W>) $* } on ^servermsg "% nuked % account*" { xecho $cparse(%p-%P=%W>) $* } on ^servermsg "Pinging all peer servers*" { xecho $cparse(%K-%w=%W>) $* } on ^servermsg "Pong from server *" { xecho $cparse(%K-%w=%W>) $* } on ^servermsg "% kicked % out of channel *" { xecho $cparse(%c-%C=%W>) $* } on ^servermsg "% has muzzled *" { xecho $cparse(%c-%C=%W>) $* } on ^servermsg "% has unmuzzled *" { xecho $cparse(%c-%C=%W>) $* } on ^servermsg "% muzzled % on channel *" { xecho $cparse(%c-%C=%W>) $* } on ^servermsg "% unmuzzled % on channel *" { xecho $cparse(%c-%C=%W>) $* } on ^servermsg "Server % has muzzled *" { xecho $cparse(%c-%c=%W>) $* } on ^servermsg "Server % has unmuzzled *" { xecho $cparse(%c-%c=%W>) $* } on ^servermsg "% banned *" { xecho $cparse(%y-%Y=%W>) $* } on ^servermsg "Server % banned *" { xecho $cparse(%y-%Y=%W>) $* } on ^servermsg "% unbanned *" { xecho $cparse(%y-%Y=%W>) $* } on ^servermsg "% removed ban on *" { xecho $cparse(%y-%Y=%W>) $* } on ^servermsg "% requested server link from *" { xecho $cparse(%g-%G=%W>) $* } on ^servermsg "Server % requested link" { xecho $cparse(%g-%G=%W>) $* } on ^servermsg "Server % has joined" { xecho $cparse(%g-%G=%W>) $* } on ^servermsg "Server % has quit*" { xecho $cparse(%r-%R=%W>) $* } on ^servermsg "% killed server *" { xecho $cparse(%r-%R=%W>) $* } on ^servermsg "Server % sent error: *" { xecho $cparse(%r-%R=%W>) $* } on ^servermsg "% changed % user level to *" { xecho $cparse(%p-%P=%W>) $* } on ^servermsg "Server % changed % user level to *" { xecho $cparse(%p-%P=%W>) $* } on ^servermsg "Server % set % user level to *" { xecho $cparse(%p-%p=%W>) $* } ### FUNCTIONS ### ## GETLINESPEED ## alias _getlinespeed (speed, void) { switch ($speed) { (0) {return Unknown} (1) {return 14.4k} (2) {return 28.8k} (3) {return 33.6k} (4) {return 56k} (5) {return ISDN-64k} (6) {return ISDN-128k} (7) {return Cable} (8) {return DSL} (9) {return T1} (10) {return T3} (*) {return Undefined \($speed\)} } } ^assign COLORS.LOADED 1 eval xecho $cparse(%BColor scheme v3.2 -%b=%r=%R- By DJHyperbyte -%r=%b=%B- Loaded!) # # I love this colours script heh # cool, everything has timestamps? # i like this colors # Did I mention I really really like your colour scheme? # can you send me your color scheme again # wow the colors # its... dj's script, lol # nice :) # looks great :) good work, d00D :) # Well done on another fine release! # nice # oh cool :D very nice #