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 

+m mode when no op avaible on chanel

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Keen
Voice


Joined: 28 Jan 2009
Posts: 10

PostPosted: Tue Sep 08, 2009 11:20 pm    Post subject: +m mode when no op avaible on chanel Reply with quote

Hello i need a tcl sciprt that will give +m mode to the channel whenn all ops left the channel. Because some users swears when there is no op on channels. Thank you and sorry for my bad english.
Back to top
View user's profile Send private message
tomekk
Master


Joined: 28 Nov 2008
Posts: 255
Location: Oswiecim / Poland

PostPosted: Sat Sep 12, 2009 11:26 am    Post subject: Reply with quote

try:
Code:
# tomekk, http://forum.egghelp.org/viewtopic.php?t=17169

# if you want to use this script on your chan, type in eggdrop console (via telnet or DCC chat)
# .chanset #channel_name +mops
# and later .save

############################################################################
bind part - "*" check_chan_ops
bind sign - "*" check_chan_ops

setudef flag mops

proc check_chan_ops { nick uhost hand chan msg } {
   global botnick

   if {![channel get $chan mops]} {
      return
   }

   set channel_users [chanlist $chan]

   set is_any_op 0

   foreach chan_user $channel_users {
      if {($chan_user != $nick) && ($chan_user != $botnick)} {
         if {[isop $chan_user $chan]} {
            set is_any_op 1
            break
         }
      }
   }

   if {$is_any_op == 0} {
      pushmode $chan +m
   }
}

putlog "m-when-zero-ops.tcl ver 0.1 by tomekk loaded"


comment:
Quote:
# iif you want to use this script on your chan, type in eggdrop console (via telnet or DCC chat)
# .chanset #channel_name +mops
# and later .save


This script check only parts and signs, not net-splits.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests 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