############################################################################ # Interface - TCL Script # # by Jay Freeman (saurik) # # # # Version: 3.73 # # Last Updated: 10/29/2000 # # # # E-Mail: (saurik@saurik.com) # # SaurikSoft (www.saurik.com, #saurik) # # &: 'fixtext' proc by Roy Keene (MenInBlak) # # &: Nickname Completion Improvements by Lee Perkins (NeW_Jadaa) # # # # Interface was originally designed to make smooth over the forwarding # # messages that people would see when a channel was being linked by your # # average linker (our own BotMaster in this case). Soon, however, saurik # # wanted to do other things, such as send back falsified ping reports to # # people since he hated people who would ping him to see how lagged they # # were (he was in the channel almost ALL the time). Interface has become # # much more than just a linker-smoother-over since then and now has many # # features to make life easier. :) # ############################################################################ # #/noq Auto-closes all open queries #/gversion Returns your CTCP version reply. #/sversion Sets your CTCP version reply. #/ghighlight Returns your highlight string. #/shighlight Sets your highlight string. #/gfinger Returns your CTCP finger reply. #/sfinger Sets your CTCP finger reply. #/sping [] Returns/Sets the mode that ping tools is currently set to. #/stime [] Returns/Sets the mode that the time system is currenty set to. #/sctcp [] Returns/Sets whethere CTCP Cloak is activated. #/split [<#channel|off>] Tells XiRCON if you want it to try to hunt for a split to regain a channel. #/sdcc [] Returns/Sets whether DCC transfers should be accepted or not. #/stdcc [] Returns/Sets whether TDCC transfers should be accepted or not. #/schat [] Returns/Sets whether DCC chats should be accepted or not. #/sraw [] Returns/Sets whether or not "raw" mode should be active or not. #/sbeep [] Returns/Sets whether or not XiRCON should beep when a new Query window is created by an incoming message. #/sncmode [] Returns/Sets whether or not nicknames should be auto completed for you, and where XiRCON should get its nicknames from. # set stars "[color join]·[color nick]•[color error]·[color default]" set preN "·•·" # « » on load { if {[get_cookie PingR] == ""} {set_cookie PingR "Off"} if {[get_cookie TimeR] == ""} {set_cookie TimeR "Off"} if {[get_cookie PageR] == ""} {set_cookie PageR "Off"} if {[get_cookie VersionR] == ""} {set_cookie VersionR "Does it matter? Let's just say it is something YOU wouldn't understand."} if {[get_cookie FingerR] == ""} {set_cookie FingerR "No ... N.O. ... No"} if {[get_cookie TDCC] == ""} {set_cookie TDCC "On"} if {[get_cookie DCC] == ""} {set_cookie DCC "On"} if {[get_cookie JoinsIC] == ""} {set_cookie JoinsIC "On"} if {[get_cookie JoinsIS] == ""} {set_cookie JoinsIS "Off"} if {[get_cookie PartsIC] == ""} {set_cookie PartsIC "On"} if {[get_cookie PartsIS] == ""} {set_cookie PartsIS "Off"} if {[get_cookie QuitsIC] == ""} {set_cookie QuitsIC "On"} if {[get_cookie QuitsIS] == ""} {set_cookie QuitsIS "Off"} if {[get_cookie CTCPCloak] == ""} {set_cookie CTCPCloak "Off"} if {[get_cookie CTCPExamine] == ""} {set_cookie CTCPExamine "Off"} if {[get_cookie PromptLength] == ""} {set_cookie PromptLength "12"} if {[get_cookie StripUUIDs] == ""} {set_cookie StripUUIDs "Off"} if {[get_cookie NiceChan] == ""} {set_cookie NiceChan "On"} if {[get_cookie RawChat] == ""} {set_cookie RawChat "Off"} if {[get_cookie GetDir] == ""} {set_cookie GetDir ""} if {[get_cookie preN] == ""} {set_cookie preN "·•·"} if {[get_cookie HType] == ""} {set_cookie HType "Line"} if {[get_cookie Highlight] == ""} {set_cookie Highlight "[my_nick] [string range [my_nick] 0 2]: [string range [my_nick] 0 3]:"} if {[get_cookie NCMode] == ""} {set_cookie NCMode "Channel"} if {[get_cookie NCLine] == ""} {set_cookie NCLine "\$n\002:\002 \$m"} echo "$stars Loaded script \"[color join]S[color error]a[color nick]u[color action]r[color ctcp]i[color nick]k[color join]S[color quit]o[color error]f[color join]t[color default] [color quit]I[color error]n[color action]t[color nick]e[color ctcp]r[color join]f[color channel]a[color ctcp]c[color part]e[color default] Improvements[color default]\" \ae1:)[color default]" status status complete } alias dialog {set_cookie Dialog [arg];/run dialogs;complete} on unload {echo "$stars Unloaded script \"[color join]S[color error]a[color nick]u[color action]r[color ctcp]i[color nick]k[color join]S[color quit]o[color error]f[color join]t[color default] [color quit]I[color error]n[color action]t[color nick]e[color ctcp]r[color join]f[color channel]a[color ctcp]c[color part]e[color default] Improvements[color default]\" \ae1:([color default]" status status;complete} alias colorz { echo "\a1a a1a\a2a a2a\a3a a3a\a4a a4a\a5a a5a\a6a a6a\a7a a7a\a8a a8a\a9a a9a\a10a a10a\a11a a11a\a12a a12a\a13a a13a\a14a a14a\a15a a15a" echo "\a1b a1b\a2b a2b\a3b a3b\a4b a4b\a5b a5b\a6b a6b\a7b a7b\a8b a8b\a9b a9b\a10b a10b\a11b a11b\a12b a12b\a13b a13b\a14b a14b\a15b a15b" echo "\a1c a1c\a2c a2c\a3c a3c\a4c a4c\a5c a5c\a6c a6c\a7c a7c\a8c a8c\a9c a9c\a10c a10c\a11c a11c\a12c a12c\a13c a13c\a14c a14c\a15c a15c" echo "\a1d a1d\a2d a2d\a3d a3d\a4d a4d\a5d a5d\a6d a6d\a7d a7d\a8d a8d\a9d a9d\a10d a10d\a11d a11d\a12d a12d\a13d a13d\a14d a14d\a15d a15d" echo "\a1e a1e\a2e a2e\a3e a3e\a4e a4e\a5e a5e\a6e a6e\a7e a7e\a8e a8e\a9e a9e\a10e a10e\a11e a11e\a12e a12e\a13e a13e\a14e a14e\a15e a15e" echo "\a1f a1f\a2f a2f\a3f a3f\a4f a4f\a5f a5f\a6f a6f\a7f a7f\a8f a8f\a9f a9f\a10f a10f\a11f a11f\a12f a12f\a13f a13f\a14f a14f\a15f a15f" complete } #on url_select { #/run [lindex [args] 0] #complete #} #--------------------------------------------------------------------------- ## General: Connection Cookie Support #--------------------------------------------------------------------------- on 014 {set COOKIE [lindex [args] 1]} on connect { if {[info exists COOKIE]} { echo "Trying Cookie: $COOKIE" /raw COOKIE $COOKIE } } #--------------------------------------------------------------------------- ## General: Spec char's in channel support. #--------------------------------------------------------------------------- alias sChan { if {[arg] == "off"} { set_cookie NiceChan "Off" echo "$stars Nice channel names is now set to [color error]Off[color default]." } elseif {[arg] == "on"} { set_cookie NiceChan "On" echo "$stars Nice channel names is now set to [color error]On[color default]." } else { echo "$stars Nice channel names is currently set to [color error][get_cookie NiceChan][color default]." } complete } proc nicechan { s1 } { if {[get_cookie NiceChan] == "On"} { set tmp "" for {set i 0} {$i < [string length $s1]} {incr i +1} { set letter [string range $s1 $i $i] if {$letter == ""} { set tmp "$tmp[color error]b[color default]" } elseif {$letter == ""} { set tmp "$tmp[color error]k[color default]" } elseif {$letter == ""} { set tmp "$tmp[color error]o[color default]" } elseif {$letter == ""} { set tmp "$tmp[color error]r[color default]" } elseif {$letter == ""} { set tmp "$tmp[color error]u[color default]" } elseif {$letter == " "} { set tmp "$tmp[color error]_[color default]" } else { set tmp "$tmp[color channel][string tolower [string range $s1 $i $i]][color default]" } } return $tmp } else { return "[color channel]$s1[color default]" } } #--------------------------------------------------------------------------- ## Eggdrop Pings #--------------------------------------------------------------------------- on ctcp_reply { if { [lindex [args] 1] == "ECHO" || [lindex [args] 1] == "ERRMSG"} { set temp0 [lindex [args] 2] if {[lindex $temp0 0] == "CLIENTINFO:"} { set temp0 [lindex $temp0 1] } set temp1 [expr [clock seconds] - $temp0] set temp2 "[color ctcp]$preN CTCP [lindex [args] 1] reply from [color nick][nick][color ctcp]: $temp1 second" if {$temp1 != 1} { set temp2 $temp2\s } echo $temp2 status complete } } on NOTICE { if {[llength [lindex [args] 1]] == 2 && [lindex [lindex [args] 1] 0] == "Now:"} { set temp1 [expr [clock seconds] - [lindex [lindex [args] 1] 1]] set temp2 "[color ctcp]$preN CTCP EMAIL reply from [color nick][nick][color ctcp]: $temp1 second" if {$temp1 != 1} { set temp2 $temp2\s } echo $temp2 status complete } } #--------------------------------------------------------------------------- ## Nicer Names Interface #--------------------------------------------------------------------------- on 353 { lecho "$preN [nicechan [lindex [args] 2]] [color nick][lindex [args] 3][color default]" complete } on names { lecho "$preN [nicechan [lindex [args] 2]] [color nick][lindex [args] 3][color default]" complete } on 366 { lecho "$preN [nicechan [lindex [args] 1]] [lindex [args] 2]" complete } #--------------------------------------------------------------------------- ## Split Detection #--------------------------------------------------------------------------- set lastsplit "" alias split { if {[arg] == "off"} { set_cookie splitwatch "" echo "$stars XiRCON will no longer hunt for a split." } elseif {[arg] == ""} { if {[get_cookie splitwatch] == ""} { echo "$stars XiRCON is not currently hunting for a split." } else { echo "$stars XiRCON is currently hunting for a split, so as to capture [color channel][get_cookie splitwatch][color default]." } } else { set_cookie splitwatch [arg] echo "$stars XiRCON will now watch for a split, move to the server, join [color channel][arg][color default], and lock it." } complete } on quit { set splitstring [lindex [args] 0] set splitstring [arg] set periods 0 set spaces 0 set lastspace 0 for {set i 1} {$i < [string length $splitstring] - 1} {incr i +1} { if {[string match "." [string range $splitstring $i $i]]} {incr periods +1} if {[string match " " [string range $splitstring $i $i]]} { incr spaces +1 set lastspace $i } } if {$spaces == 1 && $periods > 3 && $periods < 7 && [string match "*.*.* *.*.*" $splitstring]} { beep incr lastspace +1 set server [string range $splitstring $lastspace end] if {$lastsplit != $splitstring} { set lastsplit $splitstring incr lastspace -2 echo "$preN [color nick]$server[color default] has split from [color nick][string range $splitstring 0 $lastspace][color default]" status status if {[get_cookie splitwatch] != ""} { /newserver $server } } unset server } unset i unset lastspace unset spaces unset periods unset splitstring } on join { if {[nick] == [my_nick]} { if {[lindex [args] 0] == [get_cookie splitwatch]} { set_cookie splitwatch "" } } } on 376 { if {[get_cookie splitwatch] != ""} { /join [get_cookie splitwatch] /mode [get_cookie splitwatch] +i } } #--------------------------------------------------------------------------- ## DCC: Chat Interface Improvements for Eggdrop and Otherwise #--------------------------------------------------------------------------- alias sRaw { if {[arg] == "on"} { set_cookie RawChat "On" echo "$stars Raw chat is now set to: [color error]On[color default]." } elseif {[arg] == "off"} { set_cookie RawChat "Off" echo "$stars Raw chat is now set to: [color error]Off[color default]." } else { echo "$stars Raw chat is currently set to: [color error][get_cookie RawChat][color default]." } complete } proc decho { s1 s2 } { if {[get_cookie RawChat] == "Off"} {set s1 "[color nick]<$s2>[color default] $s1"} echo $s1 chat $s2 } on chat_send { if {[get_cookie RawChat] == "Off"} { echo "[color nick]<[my_nick]>[color default] [lindex [args] 0]" chat [nick] } else { echo "[color nick]>[color default] [lindex [args] 0]" chat [nick] } complete } on chatx_text { set msg [lindex [args] 0] set eggTime "" set eggChan "" set eggMembers "" set eggChops "" set eggBans "" set eggUser "" set eggBot "" set eggMisc "" if {[string match "\[\[\]*:*\] *: * member* (* chop*), * ban*" $msg]} { set msg [string range $msg 1 end] scan $msg "%\[^\]\]\] %\[^ :\] : %\[^ \] %*\[^ \] ( %\[^ \] %*\[^)\]), %\[^ \]" eggTime eggChan eggMembers eggChops eggBans set msg "\[$eggTime\] [nicechan $eggChan] - [color join]$eggMembers Member" if {$eggMembers > 1 || $eggMembers == 0} {set msg [append $msg $msg s]} set msg "$msg[color default] - [color channel]$eggChops Chop" if {$eggChops > 1 || $eggChops == 0} {set msg [append $msg $msg s]} set msg "$msg[color default] - [color error]$eggBans Ban" if {$eggBans > 1 || $eggBans == 0} {set msg [append $msg $msg s]} set msg "$msg[color default]" decho $msg [nick] } elseif {[string match "\[*\]\[*\]\[*\] (*) * is now away: *" $msg]} { scan $msg "$preN (%\[^)\]) %\[^ \] is now away: %s" eggBot eggUser eggMisc decho "$preN ([color nick]$eggBot[color default]) [color nick]$eggUser[color default] is now away: $eggMisc" [nick] } elseif {[string match "\[*\]\[*\]\[*\] * is now away: *" $msg]} { scan $msg "$preN %\[^ \] is now away: %s" eggUser eggMisc decho "$preN [color nick]$eggUser[color default] is now away: $eggMisc" [nick] } elseif {[string match "\[*\]\[*\]\[*\] (*) * is no longer away." $msg]} { scan $msg "$preN (%\[^)\]) %\[^ \] is no longer away." eggBot eggUser decho "$preN ([color nick]$eggBot[color default]) [color nick]$eggUser[color default] is no longer away." [nick] } elseif {[string match "\[*\]\[*\]\[*\] * is no longer away." $msg]} { scan $msg "$preN %\[^ \] is no longer away." eggUser decho "$preN [color nick]$eggUser[color default] is no longer away." [nick] } elseif {[string match "\[\[\]*:*\]" [lindex $msg 0]] && [string match "#*#" [lindex $msg 1]]} { set msg [string range $msg 1 end] scan $msg "%\[^\]\]\] #%\[^#\]# " eggTime eggUser decho "\[$eggTime\] #[color nick]$eggUser[color default]# [string range $msg [expr [string length $eggUser] + 10] end]" [nick] } else { decho $msg [nick] } complete } on chat_text { decho [lindex [args] 0] [nick] complete } #--------------------------------------------------------------------------- ## DCC: Chat Filter #--------------------------------------------------------------------------- alias sChat { if {[arg] == "on"} { set_cookie Chat "On" echo "$stars DCC Chat is now set to: [color error]On[color default]." } elseif {[arg] == "off"} { set_cookie Chat "Off" echo "$stars DCC Chat is now set to: [color error]Off[color default]." } else { echo "$stars DCC Chat is currently set to: [color error][get_cookie Chat][color default]." } complete } on ctcp { if { [lindex [args] 1] == "DCC" } { if {[string match "CHAT*" [lindex [args] 2]]} { echo "$stars" if {[get_cookie Chat] == "Off"} { /raw PRIVMSG [nick] :Sorry, I am not here right now, do not DCC CHAT me, I am busy. echo "$stars DCC CHAT attempt by [color nick][nick][color default] ([lindex [args] 2]) has been rejected" status status complete } } } } #--------------------------------------------------------------------------- ## DCC: Send Filter/Extended #--------------------------------------------------------------------------- alias sDCC { if {[arg] == "on"} { set_cookie DCC "On" echo "$stars DCC is now set to: [color error]On[color default]." } elseif {[arg] == "off"} { set_cookie DCC "Off" echo "$stars DCC is now set to: [color error]Off[color default]." } else { echo "$stars DCC is currently set to: [color error][get_cookie DCC][color default]." } complete } on ctcp { global tcl_precision set tcl_precision 17 if {[lindex [args] 1] == "DCC"} { if {[string match "SEND*" [lindex [args] 2]] || [string match "TSEND*" [lindex [args] 2]]} { echo "$stars [args]" if {[get_cookie DCC] == "Off"} { echo "$stars DCC attempt by [color nick][nick][color default] ([lindex [args] 2]) has been rejected" status status complete } } } } #--------------------------------------------------------------------------- ## DCC: TSend Filter #--------------------------------------------------------------------------- alias sTDCC { if {[arg] == "on"} { set_cookie TDCC "On" echo "$stars TDCC is now set to: [color error]On[color default]." } elseif {[arg] == "off"} { set_cookie TDCC "Off" echo "$stars TDCC is now set to: [color error]Off[color default]." } else { echo "$stars TDCC is currently set to: [color error][get_cookie TDCC][color default]." } complete } on ctcp { if {[lindex [args] 1] == "DCC"} { if {[string match "TSEND*" [lindex [args] 2]] != 0} { if {[get_cookie TDCC] == "Off"} { /msg [nick] Sorry, I do not accept TDCC's, please send again as a normal DCC, or do not send at all. echo "$stars TDCC attempt by [color nick][nick][color default] ([lindex [args] 2]) has been rejected" status status complete } } } } #--------------------------------------------------------------------------- ## Join/Part/Quit in Status/Channel #--------------------------------------------------------------------------- alias sJoinsIS { if { [arg] == "on" } { set_cookie JoinsIS "On" echo "$stars Joins in status is now set to: [color error]On[color default]." [window_type] [window_name] } elseif { [arg] == "off" } { set_cookie JoinsIS "Off" echo "$stars Joins in status is now set to: [color error]Off[color default]." [window_type] [window_name] } else { echo "$stars Joins in status is currently set to: [color error][get_cookie JoinsIS][color default]." [window_type] [window_name] } complete } alias sPartsIS { if { [arg] == "on" } { set_cookie PartsIS "On" echo "$stars Parts in status is now set to: [color error]On[color default]." [window_type] [window_name] } elseif { [arg] == "off" } { set_cookie PartsIS "Off" echo "$stars Parts in status is now set to: [color error]Off[color default]." [window_type] [window_name] } else { echo "$stars Parts in status is currently set to: [color error][get_cookie PartsIS][color default]." [window_type] [window_name] } complete } alias sQuitsIS { if { [arg] == "on" } { set_cookie QuitsIS "On" echo "$stars Quits in status is now set to: [color error]On[color default]." [window_type] [window_name] } elseif { [arg] == "off" } { set_cookie QuitsIS "Off" echo "$stars Quits in status is now set to: [color error]Off[color default]." [window_type] [window_name] } else { echo "$stars Quits in status is currently set to: [color error][get_cookie QuitsIS][color default]." [window_type] [window_name] } complete } alias sJoinsIC { if { [arg] == "on" } { set_cookie JoinsIC "On" echo "$stars Joins in channel is now set to: [color error]On[color default]." [window_type] [window_name] } elseif { [arg] == "off" } { set_cookie JoinsIC "Off" echo "$stars Joins in channel is now set to: [color error]Off[color default]." [window_type] [window_name] } else { echo "$stars Joins in channel is currently set to: [color error][get_cookie JoinsIC][color default]." [window_type] [window_name] } complete } alias sPartsIC { if { [arg] == "on" } { set_cookie PartsIC "On" echo "$stars Parts in channel is now set to: [color error]On[color default]." [window_type] [window_name] } elseif { [arg] == "off" } { set_cookie PartsIC "Off" echo "$stars Parts in channel is now set to: [color error]Off[color default]." [window_type] [window_name] } else { echo "$stars Parts in channel is currently set to: [color error][get_cookie PartsIC][color default]." [window_type] [window_name] } complete } alias sQuitsIC { if { [arg] == "on" } { set_cookie QuitsIC "On" echo "$stars Quits in channel is now set to: [color error]On[color default]." [window_type] [window_name] } elseif { [arg] == "off" } { set_cookie QuitsIC "Off" echo "$stars Quits in channel is now set to: [color error]Off[color default]." [window_type] [window_name] } else { echo "$stars Quits in channel is currently set to: [color error][get_cookie QuitsIC][color default]." [window_type] [window_name] } complete } ## ADD CODE 1: QUITS IN CHANNEL on join { if {[nick] == [my_nick]} { echo "[color join]$preN Now talking in [nicechan [lindex [args] 0]]" channel [lindex [args] 0] } if {[get_cookie JoinsIS] == "On"} {echo "[color join]$preN Join ([nicechan [lindex [args] 0]][color join]):[color default] [color nick][nick][color default] [color join]([user]@[host])[color default]" status} if {[get_cookie JoinsIC] == "On"} {echo "[color join]$preN Join:[color default] [color nick][nick][color default] [color join]([user]@[host])[color default]" channel [lindex [args] 0]} complete } on part { if {[nick] == [my_nick]} { echo "[color part]$preN No longer talking in [nicechan [lindex [args] 0]]" status } if {[get_cookie PartsIS] == "On"} {echo "[color part]$preN Part ([nicechan [lindex [args] 0]][color part]):[color default] [color nick][nick][color default] [color part]([user]@[host])[color default]" status} if {[get_cookie PartsIC] == "On"} {echo "[color part]$preN Part:[color default] [color nick][nick][color default] [color part]([user]@[host])[color default]" channel [lindex [args] 0]} complete } #--------------------------------------------------------------------------- ## CTCP: Examine #--------------------------------------------------------------------------- alias sCTCPEx { if {[arg] == "off"} { set_cookie CTCPExamine "Off" echo "$stars CTCP Examine is now set to [color error]Off[color default]." } elseif {[arg] == "on"} { set_cookie CTCPExamine "On" echo "$stars CTCP Examine is now set to [color error]On[color default]." } else { echo "$stars CTCP Examine is currently set to [color error][get_cookie CTCPExamine][color default]." } complete } on ctcp { if {[get_cookie CTCPCloak] == "On" && [lindex [args] 1] != "ACTION"} { set CTCPMsg "" if {[lindex [args] 2] != ""} {set CTCPMsg " [lindex [args] 2]"} echo "[color CTCP]$preN CTCP [lindex [args] 1]$CTCPMsg (Cloak) from [color nick][nick][color default]" status unset CTCPMsg complete } } on ctcp { if {[get_cookie CTCPExamine] == "On"} { echo ":[nick]![user]@[host] PRIVMSG [lindex [args] 0] :\001[string range [args] [expr [string length [lindex [args] 0]] + 1] end]\001" status } } on ctcp_reply { if {[get_cookie CTCPExamine] == "On"} { echo ":[nick]![user]@[host] NOTICE [lindex [args] 0] :\001[string range [args] [expr [string length [lindex [args] 0]] + 1] end]\001" status status } } #--------------------------------------------------------------------------- ## CTCP: Complete Cloak #--------------------------------------------------------------------------- alias sCTCP { if {[arg] == "off"} { set_cookie CTCPCloak "Off" echo "$stars CTCP Cloak is now set to [color error]Off[color default]." } elseif {[arg] == "on"} { set_cookie CTCPCloak "On" echo "$stars CTCP Cloak is now set to [color error]On[color default]." } else { echo "$stars CTCP Cloak is currently set to [color error][get_cookie CTCPCloak][color default]." } complete } on ctcp { if {[get_cookie CTCPCloak] == "On" && [lindex [args] 1] != "ACTION"} { set CTCPMsg "" if {[lindex [args] 2] != ""} {set CTCPMsg " [lindex [args] 2]"} echo "[color CTCP]$preN CTCP [lindex [args] 1]$CTCPMsg (Cloak) from [color nick][nick][color default]" status unset CTCPMsg complete } } #--------------------------------------------------------------------------- ## Invite: Current window and Join-Last #--------------------------------------------------------------------------- on invite { set lastInvite [lindex [args] 1] echo "$preN [color nick][nick][color default] invites you to join [color channel][lindex [args] 1]" status if {[window type] != "status"} { echo "$preN [color nick][nick][color default] invites you to join [color channel][lindex [args] 1]" } complete } #--------------------------------------------------------------------------- ## CTCP: Time System #--------------------------------------------------------------------------- alias sTime { if {[arg] == "off"} { set_cookie TimeR "Off" echo "$stars CTCP time reply is now set to [color error]Off[color default]." } elseif {[arg] == "on"} { set_cookie TimeR "On" echo "$stars CTCP time reply is now set to [color error]On[color default]." } elseif {[arg] == "fake"} { set_cookie TimeR "Fake" echo "$stars CTCP time reply is now set to [color error]Fake[color default]." } else { echo "$stars CTCP time reply is currently set to [color error][get_cookie TimeR][color default]." } complete } on ctcp { if {[lindex [args] 1] == "TIME"} { echo "[color CTCP]$preN CTCP TIME ([get_cookie TimeR]) from [color nick][nick][color default]" status status if {[get_cookie TimeR] == "Off"} { complete } elseif { [get_cookie TimeR] == "Fake" } { /raw notice [nick] :\001TIME Time circuits currently set to: Thu Mar 27 12:00:00 1985\001 complete } } } #--------------------------------------------------------------------------- ## CTCP: Ping Tools #--------------------------------------------------------------------------- alias sPing { if {[arg] == "off"} { set_cookie PingR "Off" echo "$stars CTCP ping reply is now set to [color error]Off[color default]." } elseif {[arg] == "on"} { set_cookie PingR "On" echo "$stars CTCP ping reply is now set to [color error]On[color default]." } elseif {[arg] == "fake"} { set_cookie PingR "Fake" echo "$stars CTCP ping reply is now set to [color error]Fake[color default]." } else { echo "$stars CTCP ping reply is currently set to [color error][get_cookie PingR][color default]." } complete } on ctcp { if {[lindex [args] 1] == "PING"} { echo "[color CTCP]$preN CTCP PING ([get_cookie PingR]) [lindex [args] 2] from [color nick][nick][color default]" status status if {[get_cookie PingR] == "On"} { /raw notice [nick] :\001PING [lindex [args] 2]\001 } elseif { [get_cookie PingR] == "Fake" } { /raw notice [nick] :\001PING [random 872000000 872390000]\001 } complete } set firstchr [string range [lindex [args] 1] 0 0] if { $firstchr == "0" || $firstchr == "1" || $firstchr == "2" || $firstchr == "3" || $firstchr == "4" || $firstchr == "5" || $firstchr == "6" || $firstchr == "7" || $firstchr == "8" || $firstchr == "9" } { /CTCP [nick] - That was NOT appreciated. foreach c [channels] {/raw kick $c [nick] :I really don't care what my ping reply is.} } } #--------------------------------------------------------------------------- ## CTCP: Page System #--------------------------------------------------------------------------- alias sPage { if {[arg] == "off"} { set_cookie PageR "Off" echo "$stars CTCP paging is now set to [color error]Off[color default]." } elseif {[arg] == "on"} { set_cookie PageR "On" echo "$stars CTCP paging is now set to [color error]On[color default]." # } elseif {[arg] == "page"} { # set_cookie PageR "Page" # echo "$stars CTCP paging is now set to [color error]Page[color default]." } elseif {[arg] == "reject"} { set_cookie PageR "Reject" echo "$stars CTCP paging is now set to [color error]Reject[color default]." } else { echo "$stars CTCP paging is currently set to [color error][get_cookie PageR][color default]." } complete } on ctcp { if {[lindex [args] 1] == "PAGE"} { if {[get_cookie PageR] == "On"} { lecho "[color CTCP]$preN CTCP PAGE ([get_cookie PageR]) from [color nick][nick][color default]" beep } else { echo "[color CTCP]$preN CTCP PAGE ([get_cookie PageR]) from [color nick][nick][color default]" status if {[get_cookie PageR] == "Reject"} { /raw PRIVMSG [nick] :Please do NOT page me! } } complete } } #--------------------------------------------------------------------------- ## CTCP: Finger/Version Reply #--------------------------------------------------------------------------- alias sVersion { set_cookie VersionR [arg] echo "$stars Your CTCP Version reply is now set to: [color channel][get_cookie VersionR]" complete } alias gVersion { echo "$stars Your CTCP Version reply is currently set to: [color channel][get_cookie VersionR]" complete } alias sFinger { set_cookie FingerR [arg] echo "$stars Your CTCP Finger reply is now set to: [color channel][get_cookie FingerR]" complete } alias gFinger { echo "$stars Your CTCP Finger reply is currently set to: [color channel][get_cookie FingerR]" complete } on ctcp { if {[lindex [args] 1] == "FINGER"} { if {[lindex [args] 2] == ""} { echo "[color CTCP]$preN CTCP FINGER from [color nick][nick][color default]" status status /raw notice [nick] :\001FINGER [get_cookie FingerR]\001 complete } } if {[lindex [args] 1] == "VERSION"} { if {[lindex [args] 2] == ""} { echo "[color CTCP]$preN CTCP VERSION from [color nick][nick][color default]" status status /raw notice [nick] :\001VERSION [get_cookie VersionR]\001 complete } } } #--------------------------------------------------------------------------- ## Whois: Various Improvements #--------------------------------------------------------------------------- set DNSready 0 #% 200 (TRACELINK): "Link " #% 201 (TRACECONNECTING): "Try. " #% 202 (TRACEHANDSHAKE): "H.S. " #% 203 (TRACEUNKNOWN): "???? []" #% 204 (TRACEOPERATOR): "Oper " #% 205 (TRACEUSER): "User " #% 206 (TRACESERVER): "Serv S C @" #% 208 (TRACENEWTYPE): " 0 " #% 211 (STATSLINKINFO): "