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:

Changing partyline flag +p

Post by iamdeath »

I need to know that is it possible to change the flag of partyline +p to something special like setting any other flag. The reason I need this feature is because I have 2 bots connected, and my users are having +fop globaly, all I want it that they could only chat with 1 bot and if they try to chat with another they get refused.

Your help will be appreciated.
Thanks.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

From eggdrop.conf:
# Enter the flags that all new users should get by default. See '.help whois'
# on the partyline for a list of flags and their descriptions.
set default-flags "hp"
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Post by iamdeath »

You did'nt get my point. I never asked for default flags, I myself have coded a script which gives everyone +fop I want them to chat with 1 bot but that bot is connected with another bot in the partyline so they can easily .relay botuser and chat there too. I was to restrict them to go to another bot, so for that I want to change the settings of the another bot. The other bot will not recognize +p users.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

chattr <handle> [changes [channel]]
Description: changes the attributes for a user record, if you include any.
Changes are of the form '+f', '-o', '+dk', '-o+d', etc. If changes are
specified in the format of |<changes> <channel>, the channel-specific
flags for that channel are altered. You can now use the +o|-o #channel
format here too.
Returns: new flags for the user (if you made no changes, the current
flags are returned). If a channel was specified, the global AND the
channel-specific flags for that channel are returned in the format of
globalflags|channelflags. "*" is returned if the specified user does
not exist.
Module: core
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

iamdeath wrote:You did'nt get my point. I never asked for default flags, I myself have coded a script which gives everyone +fop I want them to chat with 1 bot but that bot is connected with another bot in the partyline so they can easily .relay botuser and chat there too. I was to restrict them to go to another bot, so for that I want to change the settings of the another bot. The other bot will not recognize +p users.

Code: Select all

unbind dcc p relay *dcc:relay
bind dcc n relay *dcc:relay
something like this? :mrgreen:
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Post by iamdeath »

Thanks yohoo ... let me ask my question this time very easily:

Is there a way to change +p to any other flag? So that my partyline users can chat when they have that special flag I will mention.

Alchera you have'nt got my point yet.

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

Post by nml375 »

Not without editing the source.
However, you could tell each bot not to accept p-flag when sharing, using the private-globals config-setting. This atleast would allow you to restrict dcc access to individual bots on a per-user basis, even tho this means you'll have to manually manage +/-p locally at each bot (Guess you could solve this with a script that communicates over the botnet).
NML_375
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Post by iamdeath »

erm.. ok I'll try to find out how to edit the source..

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

Post by nml375 »

Then I wish you the best of luck.
However, considdering you only got two bots linked, I'd really reconsidder going with private-globals...
NML_375
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Post by iamdeath »

hey nml375 can you atleast tell me what file needs to be modified in src to change partyline flags.

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

Post by Alchera »

iamdeath wrote:hey nml375 can you atleast tell me what file needs to be modified in src to change partyline flags.

Thanks
How about you actually looking through the source files (~./src)? They are appropriately named.

Taking nml375's advice is a clean simple solution and for just 2 bots, appropriate.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Post by iamdeath »

yea I was searching there, eggdrop.h
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Just a hint, you're not looking at modifying a single file such as #define new_partyflag "q" or such...

I guess a good start would be to 'grep' for USER_PARTY which is the macro used in the source to denote the +p-flag privileges (not the flag, but the privileges it gives)
NML_375
User avatar
iamdeath
Master
Posts: 323
Joined: Fri Feb 11, 2005 2:32 pm
Location: *HeLL*
Contact:

Post by iamdeath »

Ok let me try that..

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

Post by iamdeath »

Ok I am about to modify 'dcc.c' do you think this could help me out:

Code: Select all

 buf[i++] = dcc[idx].status & STAT_CHAT ? 'C' : 'c';
  buf[i++] = dcc[idx].status & STAT_PARTY ? 'P' : 'p';
  buf[i++] = dcc[idx].status & STAT_TELNET ? 'T' : 't';
  buf[i++] = dcc[idx].status & STAT_ECHO ? 'E' : 'e';
  buf[i++] = dcc[idx].status & STAT_PAGE ? 'P' : 'p';
Changing:

Code: Select all

buf[i++] = dcc[idx].status & STAT_PARTY ? 'P' : 'p';
To

Code: Select all

buf[i++] = dcc[idx].status & STAT_PARTY ? 'G' : 'G';
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
Post Reply