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 

auto-ban
Goto page Previous  1, 2
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
edu
Voice


Joined: 29 Oct 2006
Posts: 31

PostPosted: Sun Oct 29, 2006 5:25 pm    Post subject: Reply with quote

Code:

setudef flag X

bind join - * edu:join:X

proc edu:join:X {nickname hostname handle channel} {
   if {![channel get $channel X]} { return }
   foreach ban [banlist $channel] {
      set ban_host [lindex $ban 0]
      set ban_reason [lindex $ban 1]
      set ban_by [lindex $ban 5]
      if {[string match -nocase $ban_host $nickname!$hostname]} {
         putquick "PRIVMSG X :ban $channel $ban_host 1 75 $ban_reason"
      }
   }
}

_________________
Seek the truth
Back to top
View user's profile Send private message
mavericku
Halfop


Joined: 12 Jun 2005
Posts: 62
Location: somewhere in the world

PostPosted: Sun Oct 29, 2006 7:10 pm    Post subject: Reply with quote

Thank you very much... Very Happy
_________________
mavericku
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Mon Oct 30, 2006 3:43 am    Post subject: Reply with quote

Pointless foreach but anyway you should add a 'break' statement when a match had been found as there is no need to continue matching internal bans with his host as he in theory got banned tough X.
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
Danik
Halfop


Joined: 15 Jun 2008
Posts: 49
Location: Moldova

PostPosted: Tue Jun 17, 2008 4:53 pm    Post subject: Reply with quote

I'm sorry .. but can someone explain how to add bans to this list ?
I tried to ban through telnet ( .+ban <nick> <#chan> reason ) but it doesnt work
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Tue Jun 17, 2008 9:12 pm    Post subject: Reply with quote

Code:
setudef flag X

Did you forget to .chanset #yourchan +X?
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
Danik
Halfop


Joined: 15 Jun 2008
Posts: 49
Location: Moldova

PostPosted: Wed Jun 18, 2008 2:39 am    Post subject: Reply with quote

speechles wrote:
Code:
setudef flag X

Did you forget to .chanset #yourchan +X?



THX ... it work's now
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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