This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Old posts that have not been replied to for several years.
tessa1
Halfop
Posts: 49 Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany
Post
by tessa1 » Sat Jun 25, 2005 9:21 am
Hi,
i need a simple script, that whois a user and reply a text.
Syntax: !whoreg <nick>
Possible replys are:
$nick isn't registered or $nick is registered
thx4help
tessa1
Halfop
Posts: 49 Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany
Post
by tessa1 » Mon Jun 27, 2005 12:40 pm
no idea
ircd : unreal 3.2.3
services : 1.7.10
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Mon Jun 27, 2005 6:55 pm
307 (rfc1459) RPL_WHOISREGNICK
If there's no further response, and I have the time, I'll post the code that uses that RAW.
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Mon Jun 27, 2005 9:07 pm
hmm RFC1459 doesn't specify such kind of stuff (registered/services related, there is no notion of nick/channel ownership in IRC protocol specification)
however, (surprisingly enough,) Unreal defines the same numeric for that purpose (307) as bahamut does
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Mon Jun 27, 2005 9:10 pm
or maybe not that surprisingly, otherwise mIRC wouldn't be able to display that with its own description but rather settle for the raw numeric reply coming from the server
tessa1
Halfop
Posts: 49 Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany
Post
by tessa1 » Tue Jun 28, 2005 10:43 am
mhhh...what about Nickserv status && nickserv info?
that's maybe possible I think
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Tue Jun 28, 2005 11:00 am
what about it?
tessa1
Halfop
Posts: 49 Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany
Post
by tessa1 » Tue Jun 28, 2005 11:59 am
I solved the Problem:
Code: Select all
set zop(infochan) "#AnyChan"
bind pub -|- !whoid zop:whoid
proc zop:whoid {nick host hand chan arg} {
global zop
if {![string equal $chan $zop(infochan)]} {
return 0
}
set zop(infonick) [lindex [split $arg] 0]
if {$zop(infonick) == ""} {
putquick "NOTICE $nick :Syntax: !whoid <Nick>"
return 0
}
bind notc - "*" nfo:usr
putquick "PRIVMSG nickserv :info $zop(infonick)"
putquick "PRIVMSG nickserv :status $zop(infonick)"
}
proc nfo:usr {nick host hand text {dest ""}} {
global zop botnick
set from "$nick!$host"
if {([string match -nocase "*Registriert seit:*" $text]) && ([string match -nocase "*3*" $text]) && ([string match -nocase "NickServ!Services@Any-IRC.net" $from])} {
putquick "PRIVMSG $zop(infochan) :$zop(infonick) is registered and identifyed"
return 0
}
if {([string match -nocase "*Registriert seit:*" $text]) && ([string match -nocase "*1*" $text]) && ([string match -nocase "NickServ!Services@Any-IRC.net" $from])} {
putquick "PRIVMSG $zop(infochan) :$zop(infonick) is registered but not identifyed"
return 0
}
if {([string match -nocase "*ist nicht registriert*" $text]) && ([string match -nocase "NickServ!Services@Any-IRC.net" $from])} {
putquick "PRIVMSG $zop(infochan) :$zop(infonick) isn't registered."
return 0
}
}
^DooM^
Owner
Posts: 772 Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:
Post
by ^DooM^ » Tue Jun 28, 2005 12:35 pm
I just checked and its official I am all out of medals to give you..!!
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Tue Jun 28, 2005 2:21 pm
^DooM^ wrote: I just checked and its official I am all out of medals to give you..!!
Congrats tessa1, you have done what many seem not to do; went and searched for a solution.
* Alchera has a spare medal
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Tue Jun 28, 2005 4:14 pm
Here's a DALnet version of the above script:
Code: Select all
set zop(infochan) "#AnyChan"
bind notc - "*" nfo:usr
bind pub f|f !whoid zop:whoid
proc zop:whoid {nick host hand chan arg} {
global zop
if {![string equal $chan $zop(infochan)]} {
return 0
}
set zop(infonick) [lindex [split $arg] 0]
if {$zop(infonick) == ""} {
putquick "NOTICE $nick :Syntax: !whoid <Nick>"
return 0
}
putquick "PRIVMSG nickserv@services.dal.net :acc $zop(infonick)"
}
proc nfo:usr {nick host hand text {dest ""}} {
global zop botnick
set trigger [string tolower [lindex [split $text] 1]]
set acclev [string tolower [lindex [split $text] 2]]
if {!($trigger == "acc")} {return}
if {($acclev == "3")} {putquick "PRIVMSG $zop(infochan) :$zop(infonick) is registered and identified";return}
if {($acclev == "2")} {putquick "PRIVMSG $zop(infochan) :$zop(infonick) is registered but not identified";return}
if {($acclev == "0")} {putquick "PRIVMSG $zop(infochan) :$zop(infonick) isn't registered.";return}
}
***
Edited ***
Last edited by
Alchera on Tue Jun 28, 2005 9:04 pm, edited 3 times in total.
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Tue Jun 28, 2005 6:45 pm
the bind notc can be outside the proc as well since it's useless to bind it everytime zop:whoid is triggered.
tessa1
Halfop
Posts: 49 Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany
Post
by tessa1 » Wed Jun 29, 2005 2:10 pm
It's better to use:
Code: Select all
if {([string match -nocase "*$zop(infonick) 3*" $text])}
becauce only "1" "3" can trigger the registerdate of the user in my code
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Wed Jun 29, 2005 2:53 pm
tessa1 wrote: It's better to use:
Code: Select all
if {([string match -nocase "*$zop(infonick) 3*" $text])}
becauce only "1" "3" can trigger the registerdate of the user in my code
Did I mention DALnet version?
-NickServ- Alchera ACC 3
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM
tessa1
Halfop
Posts: 49 Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany
Post
by tessa1 » Wed Jun 29, 2005 5:11 pm
becauce only "1" "3" can trigger the registerdate of the user ---> in my code <---