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.

Eggdrop and IRC Name

Help for those learning Tcl or writing their own scripts.
Post Reply
W
Weirdo
Master
Posts: 265
Joined: Sat Apr 27, 2002 8:00 pm
Location: Manchester, England

Eggdrop and IRC Name

Post by Weirdo »

Quick Question.

Is there a way for eggdrop to get the irc name (Real Name) of a user as shown in their info? Basically i have a user who keep opping a bot that he owns. It happens to be a protection bot, which shares his hostname, and nickname. The only difference between them is the IRC Name.

If i ask nickserv i can get this:

[11:08:55] -> -nickserv- info Natsuki-Chan
[11:08:58] Private: -NickServ- Natsuki-Chan is Natsuki - Owned by Weirdo

Where it gives <nick> is <irc name> on the first line.
User avatar
KrzychuG
Master
Posts: 306
Joined: Sat Aug 16, 2003 2:51 pm
Location: Torun, Poland
Contact:

Post by KrzychuG »

I'm not sure if it will be the same on your network, but on IRCnet and probably all other similiar ircds you can get irc name by doing WHOIS on that user. You'll have something like this as an answer to 'WHOIS B':
":open.pl.ircnet.net 311 A B arcain flirt.wirefame.net * :Grabowski Krzysztof"

Last argument, after ':' is an irc name. All you have to do is to WHOIS that user and bind raw on 311 reply, then parse receiver data properly.

Code: Select all

bind RAW - 311 whois:reply
proc whois:reply { from name arg } {
  set realname [string range [lrange $arg 5 end] 1 end]
  
  [...your code here...]
}
Que?
W
Weirdo
Master
Posts: 265
Joined: Sat Apr 27, 2002 8:00 pm
Location: Manchester, England

Post by Weirdo »

Thanks, ill give it a go :)
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Or you can get the name from nickserv's reply, the name would be [join [lrange [split $text] 2 end]]
Post Reply