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.

Flags Issue (Weird problem, need help)

Help for those learning Tcl or writing their own scripts.
M
Mabus4444
Halfop
Posts: 51
Joined: Mon Oct 30, 2006 7:40 pm

Flags Issue (Weird problem, need help)

Post by Mabus4444 »

I've got a sick bot. Out of nowhere it's developped some sort of flagitus or something. simply put, any script that is flag dependant has gone haywire.

They >ALL< work on the owner nick (Mabus), but they refuse to work on any other nickname, no matter what the flags used are. It gets worse....

If I add a new user, say Mabus1 for example, and give it full ownerflags, it >STILL< doesn't work.

Here's an example of what i'm talking about. Bear in mind this was working perfectly before so it's not a coding problem with the script, and the problem is across all the scripts all of which used to work before this happened out of nowhere.

bind pub o|o ${quotesbot(trigger)}addquote quotebot:addpub

[in console]

<(Debates> HANDLE PASS NOTES FLAGS LAST
<(Debates> mabus1 no 0 fhjlmnoptx never (nowhere)<(Debates> #Debates flo never

Note, Mabus1 has full flags globally and the o flag for the channel. I've tried changing the flags in the script from o|o to other variations like -|o, o|- and o

The script works PERFECTLY if i set the flag to -
So the script works fine, it's just the flags that don't work.

I've tried recompiling the bot, i've tried different versions of eggdrop, i've tried deleting the userfile and using an old one I know works, I've tried a brand new user file using eggdrop -m but nothing seems to fix this. It's not just one script either, the problem seems to be occuring across the board in every script that requires flags. I've pretty much exhausted every idea I can think of here.... any help would be greatly appreciated.
User avatar
Madalin
Master
Posts: 310
Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:

Post by Madalin »

Can i see a script that is causing this kind of troubles?
I would test that on one of my eggdrops.
It could be one of the other scripts you may loaded into the eggdrop.
User avatar
Madalin
Master
Posts: 310
Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:

Post by Madalin »

Have you tryed unload all the tcl scripts and then load one by one and see if it works? It could be only 1 script that is causing this to all others.
M
Mabus4444
Halfop
Posts: 51
Joined: Mon Oct 30, 2006 7:40 pm

Post by Mabus4444 »

I deleted the script i just posted because it was showing with smiley faces and such from the forum. Was about to upload something else for you to try when I saw you VERY QUICKLY replied, sorry about that :)

Yeah The last thing I tried a few days ago, was to create a brand new bot folder, and install the eggdrop fresh, and then upload >ONE< script (the one I uploaded and removed a couple minutes ago). Still nothing.

The sick thing is, this was on a totally different shell (different company entirely). I'm seriously running out of ideas.

A bit more background here.....

>ALL< the scripts were working fine, when the shell i was using was bought by another company. They migrated all the files over to their own shell. The problem began at that point. The scripts did not change, they simply stopped working on the new shell.

I have since tried doing a fresh install on yet another shell (which I use for my bnc's normally). The bot works fine, but again, the flags are messed up. The flags work for me, alone, and no one else. Same exact issue, different shell (3rd now).
Last edited by Mabus4444 on Sun Jan 20, 2013 1:03 pm, edited 1 time in total.
User avatar
Madalin
Master
Posts: 310
Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:

Post by Madalin »

Well its very weird i mean.. i never encoutered such problems i can only say join quakenet and i will make you a test shell account and install a eggdrop and i will see how you configure the eggdrop maybe i will figure out this way what is the problem
M
Mabus4444
Halfop
Posts: 51
Joined: Mon Oct 30, 2006 7:40 pm

Post by Mabus4444 »

I;d appreciate that! I've been running eggdrops since the mid 90's or so, and i've never seen anything like this.

Here's an example of a short script that is having this problem. I can op myself with this, other users can't.

Code: Select all

# Op someone in the channel
# Usage: !op <nick>
proc pub:op {nick uhost hand chan args} {
	 
	set args [split [cleanarg $args]]
	if {[llength $args] == 0 && ([matchattr $hand n] || [matchattr $hand "|n" $chan] || [matchattr $hand o $chan] || [matchattr $hand "|o" $chan])} {
		putserv "MODE $chan +o $nick"
	}
	if {[llength $args]<1} {
		notice $nick "Usage: !op <nick>"
		return 0
	}
	set who [lindex $args 0]
	if {$hand == "*"} {return 0}
	if {([isop $hand $chan]) || ([matchattr $hand "|o" $chan]) || ([matchattr $hand "o"])} {
		putserv "MODE $chan +o $who"
		putcmdlog "<<$nick>> !$hand! op $chan $who"
	} else {
		notice $nick "You can't do that!"
	}
}
M
Mabus4444
Halfop
Posts: 51
Joined: Mon Oct 30, 2006 7:40 pm

Post by Mabus4444 »

Just to be clear... this is not a script problem.... It's something else to do with the eggdrop....

As I said earlier;

This is affecting the handling of the flags on multiple scripts. All of them were working fine until the shell i was one was bought by a new company and migrated the accounts over. Since then, since that moment, all the scripts are having the exact same problem. That is to say;

If I type <Mabus> !op
the bot will op me

If I have the nick <Mabus2> and type !op
the bot will not op me

The global flags of the two are identical
The channel flags are identical
I have tried fresh eggdrop installs
I have tried ./eggdrop -m

Would appreciate any help.
User avatar
Madalin
Master
Posts: 310
Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:

Post by Madalin »

Instead of $hand try [nick2hand $nick]
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

A few issues I see with the script:
  • Don't use "args" as a parameter name, it's handled in a special manner in tcl, and accepts 0 or more arguments (placing them in a list). There are some cases where this might be desirable; though most certainly not in this case.
  • Consider using pushmode instead of putserv when setting channel modes. This helps your eggdrop optimizing mode settings.
  • isop needs a nickname, not a handle. It checks whether the nickname has channel operator status in the channel.
Other than that, have you verified that your users are properly recognized (use the .channels dcc-partyline command). The exerpt from the userfile listing you posted earlier would indicate that your eggdrop does not recognize mabus1 properly, as this user has never been seen by your eggdrop.
NML_375
M
Mabus4444
Halfop
Posts: 51
Joined: Mon Oct 30, 2006 7:40 pm

Post by Mabus4444 »

As far as the script is concerned, most of these are scripts which i downloaded from the egghelp file depository, most of them scripts i have been using for many years, which all suddenly stopped working well on the exact same day, the same day the shell changed. So It's not a script problem.

As for not identifying users properly, thats interesting. There may indeed be something going on there.
M
Mabus4444
Halfop
Posts: 51
Joined: Mon Oct 30, 2006 7:40 pm

Post by Mabus4444 »

Doing a quick test.....

I am finding that users with the Never on the last seen.... are not able to use the flag scripts. Users with info on the last seen >ARE< able to use it.

Whatever is causing this is related to the LAST SEEN thing.

Now how do we fix that :)
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Step 1, check users' hostmasks...
Step 2, add/remove/update hostmasks to properly identify the users in the channel...
Step 3, use .channels once again to verify that your eggdrop now recognizes them...
NML_375
User avatar
Madalin
Master
Posts: 310
Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:

Post by Madalin »

Is tested and it works

Code: Select all

# Op someone in the channel
# Usage: !op <nick>

bind pub - !op pub:op
proc pub:op {nick uhost hand chan arg} {

	set who [lindex [split $arg] 0]

	if {$who == ""} {
		if {[matchattr $hand n] || [matchattr $hand o $chan]} {
			if {[isop $nick $chan]} {
				putserv "PRIVMSG $chan :\002$nick\002 - You are already @ here"
				return
			} else {
				pushmode $chan +o $nick
			}
		}
	} else {
		if {[isop $who $chan]} { putserv "PRIVMSG $chan :\002$nick\002 - \00304$who\003 is already @ here"; return }
		if {[matchattr $hand n] || [matchattr $hand o $chan]} {
			pushmode $chan +o $who
		}
	}
}
M
Mabus4444
Halfop
Posts: 51
Joined: Mon Oct 30, 2006 7:40 pm

Post by Mabus4444 »

Confirmed, this is in fact the problem. The bot does not recognize newly added users to the last seen thing. Anyone have any ideas on how this might be fixed?
M
Mabus4444
Halfop
Posts: 51
Joined: Mon Oct 30, 2006 7:40 pm

Post by Mabus4444 »

nml375 wrote:Step 1, check users' hostmasks...
Step 2, add/remove/update hostmasks to properly identify the users in the channel...
Step 3, use .channels once again to verify that your eggdrop now recognizes them...
I have a fresh clean empty userlist with just mabus in it
I added mabus2 with the proper flags
I typed .channels and got a "what you need help?" error.. was this the right command?

I also removed the channel entirely by typing .-chan #debates
and then readded it, but that did not resolve the problem.... mabus2 being re-added is still not "seen" in the console using the .match command
Post Reply