egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Changing partyline flag +p
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help
View previous topic :: View next topic  
Author Message
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Mon Mar 19, 2007 8:01 pm    Post subject: Changing partyline flag +p Reply with quote

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
View user's profile Send private message Visit poster's website
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Mon Mar 19, 2007 8:46 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Mon Mar 19, 2007 9:06 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Mon Mar 19, 2007 10:32 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
YooHoo
Owner


Joined: 13 Feb 2003
Posts: 939
Location: Redwood Coast

PostPosted: Mon Mar 19, 2007 11:16 pm    Post subject: Reply with quote

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? Mr. Green
_________________
Mr. Green
Johoho's TCL for beginners
Mr. Green
Back to top
View user's profile Send private message Send e-mail
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Tue Mar 20, 2007 6:58 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Tue Mar 20, 2007 8:51 am    Post subject: Reply with quote

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
View user's profile Send private message
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Tue Mar 20, 2007 11:42 am    Post subject: Reply with quote

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

Thanks
Back to top
View user's profile Send private message Visit poster's website
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Tue Mar 20, 2007 12:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Thu Mar 22, 2007 4:20 pm    Post subject: Reply with quote

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

Thanks
Back to top
View user's profile Send private message Visit poster's website
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Thu Mar 22, 2007 7:20 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Thu Mar 22, 2007 8:27 pm    Post subject: Reply with quote

yea I was searching there, eggdrop.h
Back to top
View user's profile Send private message Visit poster's website
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Thu Mar 22, 2007 9:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Thu Mar 22, 2007 10:03 pm    Post subject: Reply with quote

Ok let me try that..

Thanks
Back to top
View user's profile Send private message Visit poster's website
iamdeath
Master


Joined: 11 Feb 2005
Posts: 323
Location: *HeLL*

PostPosted: Thu Mar 22, 2007 10:12 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber