This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

+m mode when no op avaible on chanel

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
K
Keen
Voice
Posts: 10
Joined: Wed Jan 28, 2009 7:47 pm

+m mode when no op avaible on chanel

Post by Keen »

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.
User avatar
tomekk
Master
Posts: 255
Joined: Fri Nov 28, 2008 11:35 am
Location: Oswiecim / Poland
Contact:

Post by tomekk »

try:

Code: Select all

# 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:
# 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.
Post Reply