egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Kick on Public Away

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Esben
Voice


Joined: 15 Oct 2005
Posts: 8

PostPosted: Thu Nov 03, 2005 4:14 am    Post subject: Kick on Public Away Reply with quote

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
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Thu Nov 03, 2005 8:17 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Linux
Halfop


Joined: 04 Apr 2004
Posts: 71
Location: Under The Sky

PostPosted: Thu Nov 03, 2005 8:23 am    Post subject: Reply with quote

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
View user's profile Send private message
Linux
Halfop


Joined: 04 Apr 2004
Posts: 71
Location: Under The Sky

PostPosted: Thu Nov 03, 2005 8:26 am    Post subject: Reply with quote

Sir_Fz, heh.. once again Wink
_________________
I'm an idiot, At least this one [bug] took about 5 minutes to find...
Back to top
View user's profile Send private message
Esben
Voice


Joined: 15 Oct 2005
Posts: 8

PostPosted: Fri Nov 04, 2005 5:38 pm    Post subject: add script Reply with quote

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
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Fri Nov 04, 2005 8:29 pm    Post subject: Reply with quote

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

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. Razz
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
Esben
Voice


Joined: 15 Oct 2005
Posts: 8

PostPosted: Sat Nov 05, 2005 8:28 am    Post subject: Reply with quote

thx guys
Back to top
View user's profile Send private message
Linux
Halfop


Joined: 04 Apr 2004
Posts: 71
Location: Under The Sky

PostPosted: Sat Nov 05, 2005 9:07 am    Post subject: Reply with quote

Dear Esben,
Question 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? Smile

-REGARDS-
_________________
I'm an idiot, At least this one [bug] took about 5 minutes to find...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber