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.

whois script/seen script

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

whois script/seen script

Post by blake »

Hey Guys im looking to get a script that will send a whois request to my eggdrop it has opers status so recieves all the infos a normal user wouldnt get

Im looking for it to do the following if a user of my eggy types /msg botnick uwhois nickname the eggy will send to the server /whois username it will then private message the user that has done the initial command with the output of the whois details it has recieved

Also looking for a seen script that will do the following my eggdrop recieves connection notices so i need for it to log all nicknames and the ips of the users connecting into a text file of some sort this would then need to beable to run a command such as /msg botnick nicklink username this will then find the username and possibly all other nicks and ips that have been linked to that same nickname it will then notice the user that has executed the command all the info available on that nickname and other possible nicknames that user has used

it recieves in fo in this form
*** Notice -- Client connecting on port 6667: scrawl32 (scrawl@data.searchirc.org) [clients]

the info i want it to log is example Nickname scrawl32 connection info (scrawl@data.searchirc.org) and also possibly log the date and time the user was logged on with this info

Thanks in advance
w
willyw
Revered One
Posts: 1203
Joined: Thu Jan 15, 2009 12:55 am

Re: whois script/seen script

Post by willyw »

blake wrote:Hey Guys im looking to get a script that will send a whois request to my eggdrop it has opers status so recieves all the infos a normal user wouldnt get
....
"to" your eggdrop?
I'm a little confused .. ... did you mean "from" your eggdrop ?


Further - what sort of info does a channel operater receive in a whois report, that a normal user does not?
This might be useful to know, before trying to figure out a way to do it.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

His bot seems to have IRCOP powers. I would help you out but would need your help on something first as haven't found the raw numeric for that line.

If you are using mIRC auth as IRCOP and then type in your 'status' window "/debug @info" and when you see that 'Notice -- Client connecting on port ...' line note down the entire line (need something like "<- :irc.server.name 123 bar foo :is using a Secure Connection") you see in the @info window, after that you can close that window and paste here that info.
Once the game is over, the king and the pawn go back in the same box.
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

Re: whois script/seen script

Post by blake »

willyw wrote:
blake wrote:Hey Guys im looking to get a script that will send a whois request to my eggdrop it has opers status so recieves all the infos a normal user wouldnt get
....
"to" your eggdrop?
I'm a little confused .. ... did you mean "from" your eggdrop ?


Further - what sort of info does a channel operater receive in a whois report, that a normal user does not?
This might be useful to know, before trying to figure out a way to do it.
The eggdrop is not a channel operator it has admin functionality on my server the extra info it gets is the nickname is connecting from info true ip some of the staff are unable to get this info because they are not admin but need this info if they need to make a report about a user the only way i can see around it is if they have the eggdrop do a whois username then the eggdrop notices them the output of the whois info

This is the info an ircop will see
Malphas229 is Malphas@edited-FE689CE3.kt.cust.t-mobile.co.uk * 29 m Cheltenham
Malphas229 is using modes +iwx
Malphas229 is connecting from *@customer38819.101.Edited-mobile.co.uk 1.edited.170
Malphas229 using irc.cwukchat.com CwUkChat NetWork
Malphas229 has been idle 1min 38secs, signed on Thu Aug 26 18:19:01
malphas229 End of /WHOIS list.

this is what a normal user sees in a whois
Malphas Malphas netadmin.CwUkChat.com * Admin
Malphas is a registered nick
Malphas ~#Friendly
Malphas irc.cwukchat.com CwUkChat NetWork
Malphas is a Network Administrator
Malphas is available for help.
Malphas has been idle for 7 minutes 41 seconds
Malphas connected on Fri Aug 13 00:06:08 BST 2010
malphas End of /WHOIS list.

<- :irc.cwukchat.com NOTICE Malphas :*** Notice -- Client connecting on port 6667: Malphas229 (Malphas@customer38819.101.kt.cust.t-mobile.co.uk) [clients]
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

I'm a bit rusty. :roll: Haven't been on a IRC channel or looked at some TCL code for quite some time.

Looks like it's a 'notice' not a raw. Right. What 'information' the bot needs to send back to the person who requested the whois on a user? Are you looking for something in particular or need all the info it receives?
Once the game is over, the king and the pawn go back in the same box.
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

Post by blake »

All the info it recieves in the whois
w
willyw
Revered One
Posts: 1203
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

Code: Select all


# Script will accept a command via /msg to the bot, to have the bot send
# a     whois        to the server on the nick submitted.
# Bot will watch for return from the server, and post that return, via 
# /notice, to the user that submitted the request.
# The idea being that since the bot is a IRCop, it can get more information
# via a   whois     than could the user submitting his own   whois   request.

# ( To do:       eliminate use of $usernick as a global variable.... look into 
# the upvar command?  )





bind msg - uwhois cmd:uwhois


proc cmd:uwhois {nick uhost hand usertext} {  
global usernick

set usernick $nick

# create binds, for the appropriate raw messages
bind raw - 311 watch311
bind raw - 379 watch379
bind raw - 378 watch378
bind raw - 319 watch319
bind raw - 312 watch312
bind raw - 317 watch317
bind raw - 318 watch318


# pausing a few seconds, before sendin the whois to the server
# ( may be unnecessary ) 
utimer 5 [list putserv "WHOIS :[lindex [split $usertext] 0]"] 



proc watch311 {from key text} {
global usernick
	putserv "notice $usernick :[join [lrange [split $text] 1 end]]"
   }

proc watch379 {from key text} {
global usernick
	putserv "notice $usernick :$text"
   }

proc watch378 {from key text} {
global usernick
	putserv "notice $usernick :$text"
   }

proc watch319 {from key text} {
global usernick
	putserv "notice $usernick :$text"
   }

proc watch312 {from key text} {
global usernick
	putserv "notice $usernick :$text"
   }

proc watch317 {from key text} {
global usernick
	set text [split $text]

        #re-arranging the output a little bit, to make it look better.
	putserv "notice $usernick : [lindex $text 1] has been idle [lindex $text 2] seconds, signed on [ctime [lindex $text 3]]"

   }



proc watch318 {from key text} {
global usernick
	putserv "notice $usernick :$text"
   }




# removing the binds after waiting a few seconds, as the monitoring of 
# these is only necessary when this script is used.

   utimer 5 [list unbind raw - 311 watch311 ] 
   utimer 5 [list unbind raw - 379 watch379 ]
   utimer 5 [list unbind raw - 378 watch378 ]
   utimer 5 [list unbind raw - 319 watch319 ]
   utimer 5 [list unbind raw - 312 watch312 ]
   utimer 5 [list unbind raw - 317 watch317 ]
   utimer 5 [list unbind raw - 318 watch318 ]

} 

Here's something to work with.
Again, you and I know that we've experimented with this some on your server. Posting this here so that anyone reading along can see where we went with it, and perhaps contribute.
:)
Post Reply