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.

registered or not registered?

Old posts that have not been replied to for several years.
t
tessa1
Halfop
Posts: 49
Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany

registered or not registered?

Post by tessa1 »

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 :)
t
tessa1
Halfop
Posts: 49
Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany

Post by tessa1 »

no idea :?:

ircd : unreal 3.2.3
services : 1.7.10
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

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
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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 ;)
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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
t
tessa1
Halfop
Posts: 49
Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany

Post by tessa1 »

mhhh...what about Nickserv status && nickserv info?

that's maybe possible I think :roll:
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

what about it?
t
tessa1
Halfop
Posts: 49
Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany

Post by tessa1 »

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
   }
  }
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

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
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

^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. :mrgreen:

* Alchera has a spare medal
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

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
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

the bind notc can be outside the proc as well since it's useless to bind it everytime zop:whoid is triggered.
t
tessa1
Halfop
Posts: 49
Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany

Post by tessa1 »

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 ;)
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

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
t
tessa1
Halfop
Posts: 49
Joined: Mon Apr 18, 2005 12:51 pm
Location: Germany

Post by tessa1 »

becauce only "1" "3" can trigger the registerdate of the user ---> in my code <--- :)
Locked