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.

can anyone help stop the mode flooding

Old posts that have not been replied to for several years.
Locked
x
xlr8shun

can anyone help stop the mode flooding

Post by xlr8shun »

hello all,
a little background to fill you in on whats going on upto this point, 4 channels, 2 public chans, 2 private chans, with 4 bots, +autoop is enabled in the private chans, not public chans. i know its not secure but oh well, noone is perfect :)

im using netbots 4.09 and working beautifly, i have added aop.tcl netbot component, and seems to be working, but only as good as giving the user +a would do, no users have +a they all (that get autooped) have the |+A flag for their corresponding private channel, i was underthe impression that aop.tcl was supposed to check the user for ops, if the user had ops, then it would not then again try to op the user, thusly 1 bot (maybe 2 if a little lag/desynch was inplace) would op a user all the time, im getting all 4 bots opping a user as he/she enters the private chans with aop.tcl

the only solution i have to this now is to .chanset #chan -autoop on all bots but 1, which will work, but if that bot is lagged or not there for some reason, doesnt op the user, defeating the whole purpose of the autoop script, does anyone use netbots with the aop.tcl component? that could help me get it working correctly on 6.1.10 or know of another script/module (netbot component or not) that would check for a users mode before blindly setting it, users need to be autoopped in private chans, the users dont know much or anything about eggdrop, and honestly they dont care to :(

i would appreciate any help anyone has. thanks :)
x
xlr8shun

Post by xlr8shun »

sorry i forgot, i guess i should probably give a little bit of my settings for aop.tcl might help a bit.

i didnt change the aop.tcl at all, its still at default, incase you dont have access to it, here it is below:

Code: Select all

# aop.tcl v1.1 (3 September 2000)
# copyright (c) 2000 by Evo|ver <evolver@blue.penguin.nl>

  
nb_killutimer "aop_doop"
set aop_debug 0

proc aop_helpidx {hand chan idx} {
	if {![matchattr $hand m|m $chan]} {return 0}
	putidx $idx "AOP.tcl commands"
	putidx $idx "For channel masters:"
	putidx $idx " do-op	stop-op		start-op	aop_test"
	return 1
}	

proc aop_help {hand chan idx cmd} {
	global aop_flag
	if {[matchattr $hand m|m $chan]} {
		switch -exact -- $cmd {
			"do-op" {
				putidx $idx "# do-op"
				putwrap $idx 3 "Ops everyone with the flag $aop_flag on demand on all channels."
				return 1
			}
			"stop-op" {
				putidx $idx "# stop-op"
				putwrap $idx 3 "Temporarily stops checking for non opped nicks with $aop_flag."
				return 1
			}
			"start-op" {
				putidx $idx "# start-op"
				putwrap $idx 3 "Restarts checking for non opped nicks with $aop_flag."
				return 1
			}
			"aop_test" {
				putidx $idx "# aop_test"
				putwrap $idx 3 "Let the bots show when they check and when they 're gonna check again. They stop when you rehash them."
				return 1
			}
		}
	}
	return 0
}

lappend nb_helpidx "aop_helpidx"
set nb_help(do-op) "aop_help"
set nb_help(start-op) "aop_help"
set nb_help(stop-op) "aop_help"
set nb_help(aop_test) "aop_help"

proc aop_doop {} {
	global aop_bots aop_chans aop_echans aop_flag aop_timer aop_debug aop_test
	foreach chan [channels] {
		set ishere 0
		foreach thisbot $aop_bots {
			if {[handonchan $thisbot $chan] && [isop $thisbot $chan]} {
				set ishere 1
				break
			}
		}
		if {!$ishere} {
			if {$aop_chans != ""} {
				if {[lsearch -exact $aop_chans [string tolower $chan]] == -1} {continue}
			}
			if {$aop_echans != ""} {
				if {[lsearch -exact $aop_echans [string tolower $chan]] != -1} {continue}
			}
			if {((![validchan $chan]) || (![botonchan $chan]) || (![botisop $chan]))} {continue}
			if {$aop_flag == ""} {
				putlog "AOP: WARNING!! No AOP-flag specified"	
				return 0
			}
			foreach nick [chanlist $chan $aop_flag|$aop_flag] {
				if {([onchan $nick $chan] && (![isop $nick $chan]) && [matchattr [nick2hand $nick] o|o $chan] && (![matchattr [nick2hand $nick] d|d $chan]))} {
					pushmode $chan +o $nick
					putlog "AOP: Gave ops to $nick on $chan"
				}	
			}
		}
	}
	set randtime [expr [rand $aop_timer] + 1]
#	utimer [expr [rand $aop_timer] + 1] aop_doop
	utimer $randtime aop_doop
	if {$aop_debug} {
		if {$aop_test != ""} {	
		putserv "PRIVMSG $aop_test :next in $randtime"
		}
	}
	return 1
}		 

proc aop_dccdoop {hand idx arg} {
	nb_killutimer "aop_doop"
	putidx $idx "Opping"
	aop_doop
	return 0
}

proc aop_dccstopop {hand idx arg} {
	if {[nb_killutimer "aop_doop"]} {
		putidx $idx "AOP opping stopped"
	} else {
		putidx $idx "AOP opping already off"
	}
	return 0
}

proc aop_dccstartop {hand idx arg} {
	global aop_timer
	if {[string match *aop_doop* [utimers]]} {
		putidx $idx "AOP opping already on"
	} else {
		utimer [expr [rand $aop_timer] + 1] aop_doop
		putidx $idx "AOP opping is now ON"
	}
	return 0
}

set aop_chans [split [string tolower $aop_chans]] ; set aop_echans [split [string tolower $aop_chans]]

if {![string match *aop_doop* [timers]]} {
	utimer [expr [rand $aop_timer] + 1] aop_doop
}

proc aop_dcctest {hand idx arg} {
	global aop_debug nb_control
	set aop_debug 1
	putlog "aop_debug is on"
	nb_sendcmd $nb_control aop_debug 1
}	

proc aop_test {frombot arg} {
	global aop_debug
	set aop_debug 1
	putlog "aop_debug is on by $frombot" 
}

set nb_netcmds(aop_debug) aop_test

bind dcc m|m do-op aop_dccdoop 
bind dcc m|m stop-op aop_dccstopop
bind dcc m|m start-op aop_dccstartop
bind dcc m|m aop_test aop_dcctest
the lines i added to my netset.tcl were:

Code: Select all

# aop.tcl setttings
set nb_component(aop) 1
set aop_chans "[i]channels to autoop on in a space seperated list[/i]"
set aop_echans ""
set aop_flag "A"
set aop_timer "400"
set aop_bots "[i]all bots nicks' in a space seperated list[/i]"
set aop_test ""
as per instructed via the readme/instructions file, i have also tried the default value of 200 in "aop_timer" and even went as high as 600 and still 'floods' modes :(
Locked