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.

X kick

Old posts that have not been replied to for several years.
Locked
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Hi, Any sugestions for how to extract the registred username ("this_user") from a kick made thru X ? Btw .. this is for Undernet's server's.

- kick -
[10:42] *** SomeOne was kicked by X((this_user) something)
- kick -

Thx!
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

bind kick - "*" kick:extract
proc kick:extract {nick uh hand chan vict reas} {
if {$nick != "X"} { return }
set person_kicked [string trim [lindex [split $reas] 0] {()}]
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Thx ppslim! I did want this only when the eggy gets kicked, not for all. :smile: Well, now I guess I got to read myself about kick bind's.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

As I read in the tcl-commands.doc the bind for kick sounds like: "bind kick <flags> <mask> <proc>". I want to bind this for "o" user's and I tyed "bind kick o "*" kick:extract" and other flags and nothing. I don't see where is my mistake. Any sugestions ? Thx!
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

I don't even see what you think the mistake is.

You will have to issue a ".restart" to get it working properly, as the original bind will still be in memory.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Well .. I did try an .restart but .. hmm .. I don't know what is hapening with this eggy now I can see a thing. I use this code:

- Code -
bind kick - "*" kick:extract

proc kick:extract {nick uh hand chan vict reas} {
if {$nick != "X"} { return }
set person_kicked [string trim [lindex [split $reas] 0] {()}]
putserv "PRIVMSG $chan :Hey person_kicked .. why are you kicking my friend $vict ?"
}
- Code -

Now is not working. Uff .. stupid windrop .. I got to test this with a linux eggdrop coz this dive me nuts. Now it's working .. now he don't ..
The code listed up he react's to all kicks and if change in there from "-" to an "o" this should react only to "o" user's. Right ?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

This infact should be

Code: Select all

bind kick - "*" kick:extract 

proc kick:extract {nick uh hand chan vict reas} { 
  if {$nick != "X"} { return } 
  set person_kicked [string trim [lindex [split $reas] 0] {()}] 
  putserv "PRIVMSG $chan :Hey $vict .. why are you kicking my friend ${person_kicked}?"
}
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

As I can see the "person_kicked" is in fact the username of the kicker and the "vict" is the real victim. Maybe I'm wrong but with my previous code this was happening like this. I don't know what is wrong with my windrop, I guess I have to test from now tcl's on a real eggdrop, a linux one. I guess my problems that I had is from this and other tcl's where not from the code. Hmm .. This is driving me nuts. That's it .. I'm moving to a linux eggdrop. Thx for help ppslim!
Locked