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 

enforce bans

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


Joined: 09 Apr 2008
Posts: 5

PostPosted: Wed Apr 09, 2008 8:54 am    Post subject: enforce bans Reply with quote

I need script like +enforce bans. But i need to bot in kick message write not (Banned) but (Banned by nick -KICK COUNT-)

There is something but don't working:
Code:
bind mode - * mode_proc

proc mode_proc {nick uhost hand chan mode target} {

   #need kick counter code:
   set kickcount 0

   if {[botisop]} {
      if {$mode eq "+b"} {
         putkick $chan $nick "\(banned by \002$nick\002 -${kickcount}-\)"
      }
   } else {
      putserv "PRIVMSG $chan :I'm not op'd!";
   }


Sorry for my english Rolling Eyes
Back to top
View user's profile Send private message
YooHoo
Owner


Joined: 13 Feb 2003
Posts: 939
Location: Redwood Coast

PostPosted: Wed Apr 09, 2008 8:56 am    Post subject: Reply with quote

There are several kick counter scripts in the archives, maybe you might wanna give one of them a go Wink
_________________
Mr. Green
Johoho's TCL for beginners
Mr. Green
Back to top
View user's profile Send private message Send e-mail
helperis
Voice


Joined: 09 Apr 2008
Posts: 5

PostPosted: Wed Apr 09, 2008 9:43 am    Post subject: Reply with quote

first i need:
on channel ban to bot enforce banned user and kick him with message
(banned by nick)

kick counter later Wink

And maybe i need go to "script requests" forum? Rolling Eyes
Back to top
View user's profile Send private message
helperis
Voice


Joined: 09 Apr 2008
Posts: 5

PostPosted: Wed Apr 09, 2008 1:27 pm    Post subject: Reply with quote

Thanks forum.egghelp.org
if anyone need this script:
Code:
set kickcount 0
proc countkicks {} {
 incr ::kickcount
}

bind mode - "* +b" enforcebans
 
proc enforcebans {nick uhost hand chan mc ban} {
  if {![string match -nocase [string map {"\\" "\\\\" "\[" "\\["} $ban] $::botname]} {
    foreach n [chanlist $chan] {
      if {[string match -nocase [string map {"\\" "\\\\" "\[" "\\["} $ban] $n![getchanhost $n $chan]]} {
        putkick $chan $n "Banned by \002$nick\002... - [countkicks] -"
      }
    }
  } else {
    pushmode $chan -o $nick
  }
}
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