| View previous topic :: View next topic |
| Author |
Message |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Mon Mar 19, 2007 8:01 pm Post subject: Changing partyline flag +p |
|
|
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. |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Mon Mar 19, 2007 8:46 pm Post subject: |
|
|
From eggdrop.conf:
| Quote: | # 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 |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Mon Mar 19, 2007 9:06 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Mon Mar 19, 2007 10:32 pm Post subject: |
|
|
| Quote: | 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 |
|
| Back to top |
|
 |
YooHoo Owner

Joined: 13 Feb 2003 Posts: 939 Location: Redwood Coast
|
Posted: Mon Mar 19, 2007 11:16 pm Post subject: |
|
|
| 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: | unbind dcc p relay *dcc:relay
bind dcc n relay *dcc:relay |
something like this?  _________________
Johoho's TCL for beginners
 |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Tue Mar 20, 2007 6:58 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Tue Mar 20, 2007 8:51 am Post subject: |
|
|
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, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Tue Mar 20, 2007 11:42 am Post subject: |
|
|
erm.. ok I'll try to find out how to edit the source..
Thanks |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Tue Mar 20, 2007 12:15 pm Post subject: |
|
|
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, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Thu Mar 22, 2007 4:20 pm Post subject: |
|
|
hey nml375 can you atleast tell me what file needs to be modified in src to change partyline flags.
Thanks |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Thu Mar 22, 2007 7:20 pm Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Thu Mar 22, 2007 8:27 pm Post subject: |
|
|
| yea I was searching there, eggdrop.h |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Thu Mar 22, 2007 9:10 pm Post subject: |
|
|
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, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Thu Mar 22, 2007 10:03 pm Post subject: |
|
|
Ok let me try that..
Thanks |
|
| Back to top |
|
 |
iamdeath Master

Joined: 11 Feb 2005 Posts: 323 Location: *HeLL*
|
Posted: Thu Mar 22, 2007 10:12 pm Post subject: |
|
|
Ok I am about to modify 'dcc.c' do you think this could help me out:
| Code: | 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: | | buf[i++] = dcc[idx].status & STAT_PARTY ? 'P' : 'p'; |
To
| Code: | | buf[i++] = dcc[idx].status & STAT_PARTY ? 'G' : 'G'; |
I've also found something in 'flags.h'
| Code: | | #define USER_PARTY 0x00008000 /* p user has party line access |
But I am not sure how to chance those 0x00008000
Thanks |
|
| Back to top |
|
 |
|