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.

who request

Old posts that have not been replied to for several years.
Locked
B
Burke
Voice
Posts: 21
Joined: Mon Feb 07, 2005 9:33 pm

who request

Post by Burke »

hi

i wanted to a script. /who who #chan %nacrihf every 3 minutes in 1 channel and with bind raw 354 to use all those data (example, ban some authnames, ban realnames, make statistic how on is away, detect trojan clients by random nick+ident+not authed and so on. but that`s hardes as i thinked....

.tcl set x "[getchanhost $nickname]" will set x to ident@provider.name.
but:

this little code

Code: Select all

bind pub m|- \$who who:chan:send 
proc who:chan:send { nickname hostname handle channel arguments } {
	puthelp "who #chan %nacrihf"
}
will affect that next time .tcl set x [getchanhost $nickname] will return anip@provider.name.

me was told that i should not use just my own who to the server. this cause some problems.

i need just a possible /who command which will me return all availible variables and a valid bind raw to catch those wars for further actions.

please tell me how i can find a doc/examples for that.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Let me lead you into the correct direction. First of all you would need to "bind raw", which will make it a bit difficult. Bind pub is not needed only if you want the bot to /who manually (when you want it to trigger).

Secondly you need to setup a loop of 3 minutes which will perform "/who $chan" One timer will be outside the proc and the other will be in it. Then bind raw 354 and go ahead and split your variables for nick, then from nick you can use getchanhost to get uhost, and for badrealname you will need to split $arg or whatever you have $text. Normally realnames in /who replies are the in the last, you would need to find the correct lindex number for that and try to match whatever you want via string match, regexp and do your stuff.
i need just a possible /who command which will me return all availible variables and a valid bind raw to catch those wars for further actions.
Take a look at this script, it is quite similar to as what you want. This is a good reference:

http://www.r0x0ring.com/dl.php?id=33

For your type of situation, a very simple example can be this:

Code: Select all

timer 3 do:who

proc do:who {} {
 putserv "WHO #channel"
 timer 3 do:who
}
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
B
Burke
Voice
Posts: 21
Joined: Mon Feb 07, 2005 9:33 pm

Post by Burke »

hey awyeah
thank you for your nice and avencend reply(s).
you make good answer, but you failed to see the important point. in the first post i wrote:
.tcl set x "[getchanhost $nickname]" will set x to ident@provider.name.

puthelp "who #chan %nacrihf"

will affect that next time .tcl set x [getchanhost $nickname] will return anip@provider.name. (sorry, next time i will use some controll codes to make this better viewable, anip@ was not a good way.)
the ident filed will changed to AnIp @ provider.host. That was my problem and reason for asking here.

What is to do in the next steps is not so hard. I know how with some things like lindex split.... for the timer i can use bind time or i can use bind pub too. anyway. etc. etc....

Code: Select all

puthelp "who #chan"
# or maybe putserv "WHO #chan"
will return a server reply like
channel nickname H ident@host :3 realname
(you can check this with your client too with /who #channel (mirc, the others i don`t know)
-
but i need more infos, i wanted know away status, authname etc.
http://www.cached.net.ms/raw.htm
354
<nick> <info on your request>
This raw is triggered when you send a who request with a second parameter. The who request should look like this '/who <string> %<o>'. The is optional and tells the server to search only in the category you specified. The <o> specifies which info the server returns. Flags: n = nick, a = authnick, c = chann, r = realname, i = ip, h = host, f = away & operstatus.

/who #channel %options
/who #channel %acrihf
i need for get all infos i need and wanne have.

but... as i sayed. example the simple command
.tcl getchanhost nickname
will get changed then, what is not really easy to understand.
G
Guest

Post by Guest »

I don't know which ircd you use but generally as I am on DALnet, bahamut, unreal, ultimate and the most common ones have replies like:

/who adapter

Code: Select all

* adapter G awyeah@awyeah.org :0 2Powered ßy 14(7,7     0,1  Energizer  
adapter End of /WHO list.
but i need more infos, i wanted know away status, authname etc.
The best would be whois in this case. The whois block shows all necessary information from which channels the nick is on, to away status, which server is the client using, all the /who line info as well plus shows if nick is identified, is the user an ircop and so on? Then you can go ahead and do invidiual binds for each raw in the whois.
G
Guest

Post by Guest »

Anonymous wrote:I don't know which ircd you use but generally as I am on DALnet, bahamut, unreal, ultimate and the most common ones have replies like:

/who adapter

Code: Select all

* adapter G awyeah@awyeah.org :0 2Powered ßy 14(7,7     0,1  Energizer  
adapter End of /WHO list.
The extra "%options" setting is for the ircd you use. So I have no idea about this as I have never encountered this myself. :roll:
but i need more infos, i wanted know away status, authname etc.
The best would be whois in this case. The whois block shows all necessary information from which channels the nick is on, to away status, which server is the client using, all the /who line info as well plus shows if nick is identified, is the user an ircop and so on? Then you can go ahead and do invidiual binds for each raw in the whois.
Anyway in a general case in your client if:

Code: Select all

/who #chan %nacrihf
works, then... this with tcl should also work technically:

Code: Select all

putserv "WHO #chan %nacrihf" 
or
putserv "WHO #chan :%nacrihf"
Not sure but try checking your ircd manual they might give the correct way for how to send a who string to the server when you include these extra switches (options).
G
Guest

Post by Guest »

I don't know which ircd you use but generally as I am on DALnet, bahamut, unreal, ultimate and the most common ones have replies like:

/who adapter

Code: Select all

* adapter G awyeah@awyeah.org :0 2Powered ßy 14(7,7     0,1  Energizer  
adapter End of /WHO list.
The extra "%options" setting is for the ircd you use. So I have no idea about this as I have never encountered this myself. :roll:
but i need more infos, i wanted know away status, authname etc.
The best would be whois in this case. The whois block shows all necessary information from which channels the nick is on, to away status, which server is the client using, all the /who line info as well plus shows if nick is identified, is the user an ircop and so on? Then you can go ahead and do invidiual binds for each raw in the whois.

Anyway in a general case in your client if:

Code: Select all

/who #chan %nacrihf
works, then... this with tcl should also work technically:

Code: Select all

putserv "WHO #chan %nacrihf" 
or
putserv "WHO #chan :%nacrihf"
Not sure but try checking your ircd manual they might give the correct way for how to send a who string to the server when you include these extra switches (options).
B
Burke
Voice
Posts: 21
Joined: Mon Feb 07, 2005 9:33 pm

Post by Burke »

i know the correct string. this is not my problem.
whois raw works fine, but it is not really possible to whois everyone (to many whois, to many users....) /who is fine
my network is quakenet.
the who with those options will recive auth, realname etc.....

the problem is if i let the bot send those /who #channel options to the server a internal function got changed then.
getchanhost nickname = ident@host
after this /who it will be ANip @ host.... this is the problem and i want to prevent this.

TO MODERATOR: did i poste as script request?
- well, please move to scripting help. it`s not a request, i will code it myself :) the problem is only a small about those /who.......
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

I'm not sure if I understand what you're after, but something like this would catch the reply from a raw who..

Code: Select all

puthelp "WHO #chan %nacrihf"

Code: Select all

bind raw - 352 reply:who
proc reply:who {from key arg} {
 # $arg contains all the info
}
B
Burke
Voice
Posts: 21
Joined: Mon Feb 07, 2005 9:33 pm

Post by Burke »

@ gb
your script works fine, but

my problem is:
.tcl getchanhost Burke
--> return: myIdent@host
after executing this script OR manuel a /who send to the server

.tcl getchanhost Burke
--> return: 127.0.0.1@host

the ident from which i can get with getchanhost will be changed to a ip. my network is www.quakenet.org, and there are some news about those ip. i don`t understand it.

i make a /who request to the server and the getchanhost return will be changed.

my first post:
me was told that i should not use just my own who to the server. this cause some problems.
anyone here, which is using quakenet and tested this? it may be sounds crazy, but it`s true.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

I'm not sure how it is changed, probobaly by another script, which effects it. Everytime the bot who's or binds to raw 352 the getchanhost will be changed.

getchanhost always gives replies => ident@host.domain.com

This will be same as the variable uhost, host we use for most proc's depending upon the bind.

If you only want the 'ident' use: [lindex [split [getchanhost $nick $chan] @] 0]
If you only want the 'host' use: [lindex [split [getchanhost $nick $chan] @] 1]
If you only want the 'domain' use: [lindex [split [maskhost [getchanhost $nick $chan]] @] 1]
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

RAW - Return 1 to ask the bot not to process the server text.
...so just return 1 from the proc when you recieve a WHO reply of your custom format. (make sure you don't return 1 when you recieve a normal reply)
Have you ever read "The Manual"?
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Or you could start by reading the Quakenet news

And i quote
#8 USERIP will return 127.0.0.1 (as will WHOX) for all users other than you.
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

2 sidenote:
1st /who will never contain the auth name unless they are using +x mode
2nd the proper way to refresh the bot internal list is "resetchan #channel", this will call a /mode #channel +b, /mode #channel and a /who #channel and save the incoming data. this will consume a bit more than 12kb per 100 users and bans. Unless you are on a weak connection this should be no problem calling once in a while (every 5-10min).
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
B
Burke
Voice
Posts: 21
Joined: Mon Feb 07, 2005 9:33 pm

Post by Burke »

De Kus wrote:2 sidenote:
1st /who will never contain the auth name unless they are using +x mode
this is 100% wrong.
/who #channel %nacrihf
(you need to be on that channel)
the server will you return the auths too.

"
Or you could start by reading the Quakenet news

And i quote

Quote:
#8 USERIP will return 127.0.0.1 (as will WHOX) for all users other than you."

why this will affect the ident after a /who request?
Locked