| View previous topic :: View next topic |
| Author |
Message |
Esben Voice
Joined: 15 Oct 2005 Posts: 8
|
Posted: Thu Nov 03, 2005 4:14 am Post subject: Kick on Public Away |
|
|
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. |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Thu Nov 03, 2005 8:17 am Post subject: |
|
|
| Code: | 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" |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
Linux Halfop

Joined: 04 Apr 2004 Posts: 71 Location: Under The Sky
|
Posted: Thu Nov 03, 2005 8:23 am Post subject: |
|
|
Dear Esben,
| Code: | #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: | 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... |
|
| Back to top |
|
 |
Linux Halfop

Joined: 04 Apr 2004 Posts: 71 Location: Under The Sky
|
Posted: Thu Nov 03, 2005 8:26 am Post subject: |
|
|
Sir_Fz, heh.. once again  _________________ I'm an idiot, At least this one [bug] took about 5 minutes to find... |
|
| Back to top |
|
 |
Esben Voice
Joined: 15 Oct 2005 Posts: 8
|
Posted: Fri Nov 04, 2005 5:38 pm Post subject: add script |
|
|
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: |
#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"
|
|
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Fri Nov 04, 2005 8:29 pm Post subject: |
|
|
1) Do you think Sir_Fz would waste his time deliberately giving you a script that would not work?
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.  _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
Esben Voice
Joined: 15 Oct 2005 Posts: 8
|
Posted: Sat Nov 05, 2005 8:28 am Post subject: |
|
|
| thx guys |
|
| Back to top |
|
 |
Linux Halfop

Joined: 04 Apr 2004 Posts: 71 Location: Under The Sky
|
Posted: Sat Nov 05, 2005 9:07 am Post subject: |
|
|
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: | | pushmode $chan +b *!*@[lindex [split $uhost @] 1] |
as a result from above bot will banned *!*@full.domain.com
by Me(Linux)
| Code: | | 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,
| Quote: | [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:
| Quote: | [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... |
|
| Back to top |
|
 |
|