| View previous topic :: View next topic |
| Author |
Message |
sattam Voice
Joined: 02 Jan 2010 Posts: 20
|
Posted: Fri Jan 08, 2010 2:19 pm Post subject: Can I do |
|
|
| Code: | ## Give your channel name here.
set scriptchannel "#info"
bind pub -|- !nick script:text1
bind notc -|- "*Info for *" script:notices1
bind notc -|- "*For extra info*" script:notices1
bind notc -|- "*Last seen address*" script:notices1
bind notc -|- "*Last seen time*" script:notices1
bind notc -|- "*Time registered*" script:notices1
bind notc -|- "*Time now*" script:notices1
bind notc -|- "*E-Mail address*" script:notices1
bind notc -|- "*This nick has been*" script:notices1
proc script:text1 { nick host handle chan text } {
global scriptchannel user
set text [split $text]
set user [lindex $text 0]
if {$user == ""} {puthelp "NOTICE $nick :You need to supply a nickname.";
return}
putserv "PRIVMSG nickserv :info $user"
}
|
it`s work
but how i can add
| Quote: |
[06:18:10‹pm›] (=KLINE) Msg to nickserv: list *@x.x.x.x
[06:18:10‹pm›] (=KLINE) [12:18] -NickServ (Service@WeArab.Net)- LIST of nicks (Search paramater = *@x.x.x.x)
[06:18:10‹pm›] (=KLINE) [12:18] -NickServ (Service@WeArab.Net)- 1) GaX (~Cell@x.x.x.x) [hours]
[06:18:10‹pm›] (=KLINE) [12:18] -NickServ (Service@WeArab.Net)- Displayed 1 of 1 match results. (0 private)
[06:18:10‹pm›] (=KLINE) [12:18] -NickServ (Service@WeArab.Net)- *** End of list ***
|
|
|
| Back to top |
|
 |
arfer Master

Joined: 26 Nov 2004 Posts: 436 Location: Manchester, UK
|
Posted: Fri Jan 08, 2010 4:47 pm Post subject: |
|
|
Full marks for persevering!
You could use logic something like the following :-
| Code: |
# nsinfo.tcl
set vNsinfoServices "nickserv@services.dal.net"
set vNsinfoChannel #eggtcl
bind PUB - !nsinfo pNsinfoSend
bind NOTC - * pNsinfoReceive
proc pNsinfoSend {nick uhost hand chan text} {
global vNsinfoChannel vNsinfoServices
if {[string equal -nocase $chan $vNsinfoChannel]} {
set target [string tolower [regsub -all -- {[\s]{2,}} [string trim $text] { }]]
if {[llength [split $target]] == 1} {
if {[regexp -- {^[\x41-\x7D][-\d\x41-\x7D]*$} $target]} {
putserv "PRIVMSG $vNsinfoServices :INFO $target"
} else {putserv "PRIVMSG $vNsinfoChannel :$target is not a valid nick"}
} else {putserv "PRIVMSG $vNsinfoChannel :correct usage !nsinfo <nick>"}
}
return 0
}
proc pNsinfoReceive {nick uhost hand text dest} {
global vNsinfoChannel vNsinfoServices
if {([isbotnick $dest]) && ([string match -nocase ${nick}* $vNsinfoServices])} {
set msg [stripcodes bcruag [string trim $text]]
if {[string match -nocase "*info for*" $msg]} {
putserv "PRIVMSG $vNsinfoChannel :$msg"
} elseif {[string match -nocase "*currently on irc*" $msg]} {
putserv "PRIVMSG $vNsinfoChannel :$msg"
} elseif {[string match -nocase "*last seen address*" $msg]} {
putserv "PRIVMSG $vNsinfoChannel :$msg"
} elseif {[string match -nocase "*last seen time*" $msg]} {
putserv "PRIVMSG $vNsinfoChannel :$msg"
} elseif {[string match -nocase "*time registered*" $msg]} {
putserv "PRIVMSG $vNsinfoChannel :$msg"
} elseif {[string match -nocase "*time now*" $msg]} {
putserv "PRIVMSG $vNsinfoChannel :$msg"
} elseif {[string match -nocase "*options: *" $msg]} {
putserv "PRIVMSG $vNsinfoChannel :$msg"
} elseif {[string match -nocase "*end of info*" $msg]} {
putserv "PRIVMSG $vNsinfoChannel :$msg"
} elseif {[string match -nocase "*is not registered*" $msg]} {
putserv "PRIVMSG $vNsinfoChannel :$msg"
} elseif {[string match -nocase "*is frozen*" $msg]} {
putserv "PRIVMSG $vNsinfoChannel :$msg"
} elseif {[string match -nocase "*cannot be registered*" $msg]} {
putserv "PRIVMSG $vNsinfoChannel :$msg"
}
}
return 0
}
putlog "nsinfo.tcl loaded"
# eof
|
| Quote: |
[20:42] <@arfer> !nsinfo arfer
[20:42] <@osmosis> Info for arfer:
[20:42] <@osmosis> (Currently on IRC) For extra info: /whois arfer
[20:42] <@osmosis> Last seen address : arfer@xxx
[20:42] <@osmosis> Last seen time : Fri 08-Jan-2010 20:33:00 UTC
[20:42] <@osmosis> Time registered : Sat 04-May-2002 14:22:47 UTC
[20:42] <@osmosis> Time now : Fri 08-Jan-2010 20:42:22 UTC
[20:42] <@osmosis> *** End of Info ***
|
_________________ I must have had nothing to do |
|
| Back to top |
|
 |
sattam Voice
Joined: 02 Jan 2010 Posts: 20
|
Posted: Fri Jan 08, 2010 7:40 pm Post subject: |
|
|
Wonderful job
But how
/ns list *@125.*
| Quote: |
[11:40‹NickServ›] LIST of nicks (Search paramater = *@125.*)
[11:40‹NickServ›] ) ahmadnaweed (~WeArab@x.x.x.x) [months]
[11:40‹NickServ›] ) popzaa (~WeArab@x.x.x.x) [months]
[11:40‹NickServ›] ) Story (~a@x.x.x.x) [weeks]
[11:40‹NickServ›] ) Wahab (~Wahab@x.x.x.x) [weeks]
[11:40‹NickServ›] Displayed 4 of 4 match results. (0 private)
[11:40‹NickServ›] *** End of list ***
|
|
|
| Back to top |
|
 |
arfer Master

Joined: 26 Nov 2004 Posts: 436 Location: Manchester, UK
|
Posted: Fri Jan 08, 2010 7:59 pm Post subject: |
|
|
Sorry I misread your question.
The command /ns list is either not available on the network I frequent (DALnet), or is restricted to ircops or above. Hence, I can't be sure of its usage. _________________ I must have had nothing to do |
|
| Back to top |
|
 |
sattam Voice
Joined: 02 Jan 2010 Posts: 20
|
Posted: Fri Jan 08, 2010 8:16 pm Post subject: |
|
|
| arfer wrote: | Sorry I misread your question.
The command /ns list is either not available on the network I frequent (DALnet), or is restricted to ircops or above. Hence, I can't be sure of its usage. |
ok thanks
can i add u msn ? |
|
| Back to top |
|
 |
sattam Voice
Joined: 02 Jan 2010 Posts: 20
|
Posted: Fri Jan 08, 2010 8:49 pm Post subject: |
|
|
| Thank you I did it |
|
| Back to top |
|
 |
BhasIRC Voice
Joined: 02 Jan 2010 Posts: 27 Location: south africa
|
Posted: Tue Jan 12, 2010 6:58 am Post subject: |
|
|
| is there a way to work out how long a person is registered for expl say i typ !infonick and it must just say nick is registered for 2 months an 2 weeks |
|
| Back to top |
|
 |
sotengboy Voice
Joined: 03 Jan 2010 Posts: 14
|
Posted: Tue Mar 30, 2010 12:25 pm Post subject: |
|
|
excuse me
can nsinfo.tcl change to csinfo.tcl
so, the bot can perform chanel info to the chanel target
please reply
thanks |
|
| Back to top |
|
 |
|