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.

Changing partyline flag +p

General support and discussion of Eggdrop bots.
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Post by iamdeath »

yaaaaaaaaaaaaaa! I got it..

I changed:

Code: Select all

#define USER_PARTY         0x00008000 /* p  user has party line access            */
To:

Code: Select all

#define USER_PARTY         0x00002000 /* p  user has party line access            */

0x00002000 denotes +n users to chat only, and I recompiled the bot it worked amazingly :D

yay!.. now I wish I could know how to set my own flags, I don't know how to convert those digits..

Thanks
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Post by iamdeath »

Ok 1 problem:

Users can't directly /ctcp botnick chat but through second bot they can use .relay however I've changed +p earlier, what could that be a problem, how to find relay souce.

Thanks
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Actually, your change effectively grants owner privileges to anyone given master or botnet master privileges...
Also might have some unexpected effects on channel-speciffic flags (as there's no channel-speciffic 'p'). Have you verified that the userfile is written and read properly?

As for the .relay-command, 'tis just a basic dcc binding... unbind it just like you'd unbind any other unwanted commands (check yer configfile for examples).

And still further, unbinding the .relay-command won't prevent ppl from starting up their telnet-client, or faking a dcc chat request to themselves.

And I still can't see why you go through all this trouble when it'd just be a matter of adding the p-flag to private-globals, but it's your bots and your mess...
NML_375
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Post by iamdeath »

I don't understand what you mean with adding p-flag .. that's the reason I am trying to help myself out with modifying source, I just want to change +p to any other flag that was my question.

And if i unbind the relay command in the config file then 1 of my TCL wont work, I use Relay tcl for 2 networks.


Thanks
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

You have made what was a simple solution (KISS principle) into an unnecessary complicated mess.

It really is a very good idea to attempt a read at the documentation before trying any other "solution" to a "brainstorm".
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

I'm talking of the config-setting private-globals.. (just check my first posts)
It's a pretty well-documented setting, and had you even bothered to check it up in your config-file, you'd known what I was referring to.
NML_375
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Post by iamdeath »

Thanks alot for replying me soo quickly I really appreciate that, let's come back to the point.

You're I guess referring me to :

Code: Select all

# When sharing user lists, DON'T ACCEPT global flag changes from other bots?
# NOTE: The bot will still send changes made on the bot, it just won't accept
# any global flag changes from other bots. This overrides the private-globals
# setting (below).
#set private-global 0
If this is what you want me to use then it's completely helpless for me. Ok let me tell you in brief now how my bots work.

I have a channel with 2 bots.

1. BOT1 (Main)
2. BOT2 (Hub)
Sharing userfile as well

Both are connected, now BOT1 has a script coded which adds users with +fop flags ( i have mentioned those flags ), so that means both the bots will have the same userfile, so it's upto users on which they use /ctcp botnick chat. I wanted that BOT1 shouldnt allow +p to chat with it, whereas BOT2 should entertain users. With your help I successfully made that thing, now users can't chat with BOT1 but if they're logged in BOT2 they can use .relay and come to BOT1. All I now want to ask you guys is how can I set flags for .relay for user :)

Thank You for being with me :)
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Nope, private-globals, with an s at the end. This one allows you to filter single flags, rather than all global flags...

As for the .relay-command, as stated in a previous post, it's just a basic dcc binding, once again, check your config-file for an example on how to alter/remove bindings (numerous examples including .set/.tcl dcc commands, msg greet command, etc).
NML_375
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Post by iamdeath »

but if I bind relay command do you think my bots will be able to relay text?'

Thanks
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Post by iamdeath »

so nml can you tell me please?
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Relaying what text?
Using the .relay command just makes your bot behave like a telnet client for the user who invoked the command. Rebinding it restricts who may invoke the command, it will not affect the behaviour of the command itself.

Besides, if your modifications work as you intend them to, even if they can use the .relay-command, the second bot really should'nt let them log on. If it does, what's to prevent your "evil" users from just starting their own telnet-client and enter the address of the second bot? Or just simply send a fake dcc chat-request to themselves?

Edit: Also, bumping posts is generally considdered a bad practise.
NML_375
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

iamdeath wrote:I've also found something in 'flags.h'

Code: Select all

#define USER_PARTY         0x00008000 /* p  user has party line access
But I am not sure how to chance those 0x00008000

Thanks
I am not positive, but I believe this line is refering to what is displayed when you type .whois nick. I wouldn't change that hexidecimal number at all :mrgreen:
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

@YooHoo: Actually, that's the bit-flag used to internally represent p-flag in some parts of the code. It is used whenever the code checks, sets and unsets p-flag (as I recall, it is not used when reading or writing the userfile however). Still I agree that editing this might not be such a good idea.

As for now, I am not going to put much further effort in this thread, as the original author seems to be looking for a "quick-fix" for doing it the very hard way (although this thread is posted under "Eggdrop Help", the modifications requested is not trivial, and an ample solution has been provided that does not require source modifications - hence I'd expect some efforts from the author rather than just bumping the same question over and over).
NML_375
Post Reply