set cprev "."################################################################################### VER CSINFO/NSINFO WHOIS##################################################################################set fromchan "NONE"set cctarget "NONE"set fromchancs "NONE"set cctargetcs "NONE"set fromchanns "NONE"set cctargetns "NONE"##################################################################################
bind pub - "${cprev}version" proc:versionbind pub - "${cprev}csinfo" proc:csinfobind pub - "${cprev}nsinfo" proc:nsinfobind ctcr - VERSION ctcr:versionbind notc - * notc:version
proc proc:version {nick uhost hand chan text} {global botnick fromchan cctargetif {[string tolower $nick] != [string tolower $botnick]} {set fromchan $chanset cctarget [lindex $text 0]putquick "PRIVMSG $cctarget :\004VERSION\014"return 1}}
proc proc:csinfo {nick uhost hand chan text} {global botnick fromchancs cctargetcsif {[string tolower $nick] != [string tolower $botnick]} {set fromchancs $chanset cctargetcs [lindex $text 0]putquick "cs info $cctargetcs"return 1}}
proc proc:nsinfo {nick uhost hand chan text} {global botnick fromchanns cctargetnsif {[string tolower $nick] != [string tolower $botnick]} {set fromchanns $chanset cctargetns [lindex $text 0]putquick "ns info $cctargetns"return 1}}
proc ctcr:version {nick uhost hand dest key arg} {global botnick fromchan cctargetif {($fromchan == "NONE") || ($cctarget == "NONE")} {return 0}if {[string tolower $nick] != [string tolower $botnick]} {putquick "PRIVMSG $fromchan :14(06$nick 14VERSION 15reply4!14) 1: \00314$arg\003"set fromchan "NONE"set cctarget "NONE"return 1}}
proc notc:version {nick uhost hand text {dest ""}} {global botnick fromchan cctarget fromchancs cctargetcs fromchanns cctargetnsif {$dest == ""} { set dest $botnick }if {($fromchan != "NONE") && ($cctarget != "NONE")} {if {([string tolower $nick] == [string tolower $cctarget]) && ([string match "*version*" [lindex [string tolower $text] 0]])} {putquick "PRIVMSG $fromchan :14(06$nick 14VERSION 15reply4!14) 1: \00314$text\003"set fromchan "NONE"set cctarget "NONE"return 1}}if {($fromchancs != "NONE") && ($cctargetcs != "NONE")} {if {[string tolower $nick] == "chanserv"} {putquick "PRIVMSG $fromchancs :00314$text\003"putquick "PRIVMSG $fromchancs :00314$text\003"if {[string match "*end of info*" [zzstripcodes [string tolower $text]]]} {set fromchancs "NONE"set cctargetcs "NONE"return 1}}}if {($fromchanns != "NONE") && ($cctargetns != "NONE")} {if {[string tolower $nick] == "nickserv"} {putquick "PRIVMSG $fromchanns :\00314$text\003"if {[string match "*end of info*" [zzstripcodes [string tolower $text]]]} {set fromchanns "NONE"set cctargetns "NONE"return 1}}}}
################################################################################### WHOIS##################################################################################
bind pub - "${cprev}whois" whois:nick
proc whois:nick { nickname hostname handle channel arguments } {global whoisset target [lindex [split $arguments] 0]if {$target == ""} {putquick "PRIVMSG $channel :14Whois contohnya : .whois g0eZ"return 0}putquick "WHOIS $target $target"set ::whoischannel $channelset ::whoistarget $targetbind RAW - 401 whois:nosuchbind RAW - 311 whois:infobind RAW - 319 whois:channelsbind RAW - 312 whois:serverbind RAW - 301 whois:awaybind RAW - 313 whois:ircopbind RAW - 317 whois:idlebind raw - 338 whois:hostbind raw - 318 whois:eof}
proc whois:putmsg { channel arguments } {putquick "PRIVMSG $channel :14\00314$arguments\003"}
proc whois:info { from keyword arguments } {set channel $::whoischannelset nickname [lindex [split $arguments] 1]set ident [lindex [split $arguments] 2]set host [lindex [split $arguments] 3]set realname [string range [join [lrange $arguments 5 end]] 1 end]whois:putmsg $channel "14$nickname is $ident@$host * $realname"unbind RAW - 311 whois:info}
proc whois:ircop { from keyword arguments } {set channel $::whoischannelset target $::whoistargetwhois:putmsg $channel "14$target is an IRC Operator"unbind RAW - 313 whois:ircop}
proc whois:away { from keyword arguments } {set channel $::whoischannelset target $::whoistargetset awaymessage [string range [join [lrange $arguments 2 end]] 1 end]whois:putmsg $channel "14$target is away: $awaymessage"unbind RAW - 301 whois:away}
proc whois:channels { from keyword arguments } {set channel $::whoischannelset channels [string range [join [lrange $arguments 2 end]] 1 end]set target $::whoistargetwhois:putmsg $channel "14$target on $channels"unbind RAW - 319 whois:channels}
proc whois:server { from keyword arguments } {set channel $::whoischannelset server [lindex [split $arguments] 2]set info [string range [join [lrange $arguments 3 end]] 1 end]set target $::whoistargetwhois:putmsg $channel "14$target using $server $info"unbind raw - 312 whois:server}
proc whois:nosuch { from keyword arguments } {set channel $::whoischannelset target $::whoistargetwhois:putmsg $channel "14Gak ada OnLine si \"$target\""unbind RAW - 401 whois:nosuch}
proc whois:idle { from keyword arguments } {set channel $::whoischannelset target $::whoistargetset idletime [lindex [split $arguments] 2]set signon [lindex [split $arguments] 3]whois:putmsg $channel "14$target has been idle for [duration $idletime]. signon time [ctime $signon]"unbind RAW - 317 whois:idle}
proc whois:host { from keyword arguments } {set channel $::whoischannelset target $::whoistargetset hostname [lindex [split $arguments] 2]whois:putmsg $channel "14$target actually using host $hostname"unbind raw - 338 whois:auth}
proc whois:eof { from keyword arguments } {set channel $::whoischannelset target $::whoistargetset eof [string range [join [lrange [split $arguments] 2 end]] 1 end]whois:putmsg $channel "14$target $eof"unbind raw - 318 whois:eof}
################################################################################### CTCP VERSION/FINGER REPLY##################################################################################bind ctcp - VERSION ctcppingreplyproc ctcppingreply {nick uhost hand dest key arg} {global botnickputserv "NOTICE $nick :\014VERSION 6ciut8IR4C 14B7eta 5(9New5) 3By g0eZ 15( 12http://ciut.peperonity.com 15)\001"return 1}
bind ctcp - FINGER ctcpfingerreplyproc ctcpfingerreply {nick uhost hand dest key arg} {global botnickputserv "NOTICE $nick :\014FINGER 6ciut8IR4C 14B7eta 5(9New5) 3By g0eZ 15( 12http://ciut.peperonity.com 15)\001"return 1}
################################################################################### UTILS##################################################################################proc zzstripcodes {text} {regsub -all -- "\003(\[0-9\]\[0-9\]?(,\[0-9\]\[0-9\]?)?)?" $text "" textregsub -all -- "\t" $text " " textset text "[string map -nocase [list \002 "" \017 "" \026 "" \037 ""] $text]"return $text}
putlog "version nsinfo csinfo whois edited by eggo loaded....."
Sunday, August 28, 2011
sinfo.tcl
Labels:
tCL
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment