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.

Kick on Public Away

Help for those learning Tcl or writing their own scripts.
Post Reply
E
Esben
Voice
Posts: 8
Joined: Sat Oct 15, 2005 7:56 pm

Kick on Public Away

Post by Esben »

hello

i have this auto kick on public away.
just need do know if is possible to add a unban part to it, So it will auto unban after 20 min

script can be found here

or if wood be better to remake that whole script.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

bind ctcp - ACTION ctcp:away
 
proc ctcp:away {nick host handle chan keyword args} {
 if {[isop $nick $chan]==1} {return 0} 
 if {[string match -nocase "ACTION" $keyword]!=1} {return 0}
 if {[string match -nocase "#fun-gaming" $chan]==0} {return 0}
 if {[string match -nocase "*away*" [join $args]]!=0} { 
  set reason "no away scripts"
  puthelp "KICK $chan $nick :$reason"
  pushmode $chan +b *!*@[lindex [split $uhost @] 1]
  timer 20 [list pushmode $chan -b *!*@[lindex [split $uhost @] 1]]
 }
}

putlog "joeґs awaykicker 1.0 loaded successfully"
User avatar
Linux
Halfop
Posts: 71
Joined: Sun Apr 04, 2004 4:20 pm
Location: Under The Sky

Post by Linux »

Dear Esben,

Code: Select all

#joe´s awayscriptkicker 1.0
#you may not change the lines after # :)
#have fun with it and visit jf7.de & #s0uls for further questions

#you just need to change #azeroth.cs in the channel you want to use this script
#after 'set reason' you can change the reason which is displayed as kickreason

bind ctcp - ACTION ctcp:away
 
proc ctcp:away {nick host handle chan keyword args} {
 if {[isop $nick $chan]==1} {return 0} 
 if {[string match -nocase "ACTION" $keyword]!=1} {return 0}
 if {[string match -nocase "#fun-gaming" $chan]==0} {return 0}
 if {[string match -nocase "*away*" [join $args]]!=0} { 
  set reason "no away scripts"
   puthelp "KICK $chan $nick :$reason"
 }
}

putlog "joe´s awaykicker 1.0 loaded successfully"
There is no such BAN part in your TCL which you mention above. If you wish to add Ban & Unban then add the following codes after KICK line:

Code: Select all

putquick "MODE $chan +b $host" 
timer 20 [list putquick "MODE $chan -b $host"]
-REGARDS-
I'm an idiot, At least this one [bug] took about 5 minutes to find...
User avatar
Linux
Halfop
Posts: 71
Joined: Sun Apr 04, 2004 4:20 pm
Location: Under The Sky

Post by Linux »

Sir_Fz, heh.. once again :wink:
I'm an idiot, At least this one [bug] took about 5 minutes to find...
E
Esben
Voice
Posts: 8
Joined: Sat Oct 15, 2005 7:56 pm

add script

Post by Esben »

first off all thx

i just have two questions.

1 / For how long will it set ban ?

2 / Is that code below right and will it work ?

Code: Select all

#joe´s awayscriptkicker 1.0
#you may not change the lines after # :)
#have fun with it and visit jf7.de & #s0uls for further questions

#you just need to change #azeroth.cs in the channel you want to use this script
#after 'set reason' you can change the reason which is displayed as kickreason

bind ctcp - ACTION ctcp:away
 
proc ctcp:away {nick host handle chan keyword args} {
 if {[isop $nick $chan]==1} {return 0} 
 if {[string match -nocase "ACTION" $keyword]!=1} {return 0}
 if {[string match -nocase "#fun-gaming" $chan]==0} {return 0}
 if {[string match -nocase "*away*" [join $args]]!=0} { 
  set reason "no away scripts"
   puthelp "KICK $chan $nick :$reason"
   putquick "MODE $chan +b $host"
   timer 20 [list putquick "MODE $chan -b $host"]
 }
}

putlog "joe´s awaykicker 1.0 loaded successfully"
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

1) Do you think Sir_Fz would waste his time deliberately giving you a script that would not work? :roll:

2) Did you even bother to test it?

3) Read the code: timer 20 [list putquick "MODE $chan -b $host"]

Go and read tcl-commands.doc and learn about timer. :P
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
E
Esben
Voice
Posts: 8
Joined: Sat Oct 15, 2005 7:56 pm

Post by Esben »

thx guys
User avatar
Linux
Halfop
Posts: 71
Joined: Sun Apr 04, 2004 4:20 pm
Location: Under The Sky

Post by Linux »

Dear Esben,
:?: erGh! are you using any other TCL beside the codes which has been pasted here by Sir_Fz or me ?

Just the see the codes and their functions:-
by Sir_Fz

Code: Select all

pushmode $chan +b *!*@[lindex [split $uhost @] 1]
as a result from above bot will banned *!*@full.domain.com

by Me(Linux)

Code: Select all

putquick "MODE $chan +b $host"
as a result from above bot will banned *!ident@full.domain.com

Now let see what your bot has done, as you use banmask $host, so here it goes fine,
[13:04:38] » +Esben is away
[13:04:38] »» [m]ode> [Home] sets [+b *!Esben@crew.web52.dk]
[13:04:38] »» [T]his [*!Esben@crew.web52.dk] ban affects [+Esben]
but afterwards your bot do something different here, see:
[13:04:38] »» [m]ode> [Home] sets [-b+b *!Esben@crew.web52.dk *!Esben@*.web52.dk]
[13:04:38] »» [T]his [*!Esben@*.web52.dk] ban affects [+Esben]
Your bot change the banbask FROM *!ident@full.domain.com TO *!ident@*.domain.com which HAS NOT BEEN TOLD you from Sir_Fz or me either then where it comes from?
IF you are using any other TCL then ATLEAST don't blame us that your bot didn't unban that hostmask after 20 minutes.
still any confusion? :)

-REGARDS-
I'm an idiot, At least this one [bug] took about 5 minutes to find...
Post Reply