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.

bind problems

Old posts that have not been replied to for several years.
Locked
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

bind problems

Post by ReaLz »

Hello,
I've tried to unbind the "adduser" command from the conf file and bind it to an other flag, but somebody told me that the problem is that is not a core command but a command from the "irc module" how can I unbind and rebind a command which is from an other module?
«A fantastic spaghetti is a spaghetti that does not exist»
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

All commands can be re-bound, though you have to follow a few simple rules.

First, to unbind somthing, it needs to have been bound in the first place. As such, the module that provides the commands needs to be pre-loaded.

Second, the unbind command, should look exactly how it would have been bound in the first place (had it been done in Tcl), with the "un" at the begining.

Too workout the unbind command, you use the following format
unbind <type> <flags> <keyword> <command>
This is a DCC command, so you use DCC for <type>

The flags need to be exactly how it is bound. Using ".bind dcc all" int eh partyline, will help you find the flags.

the keyword int hsi case is adduser

The command can be easily worked out. If it's provided by eggdrop, then the command will be in the following format
*<type>:<keyword>
Thus, for the adduser command, you use
*dcc:adduser

However, the simplest way to obtain it, is used in command above, to obtain the flags, as the output also shows the command name.

This is enough to get you going on this, but there is one small catch.

Some commands, are either bound to all users, or very low level flags. Within the code, there will usualy be a second flag matching sequance.

Thus depending on which way you change the flags, it still may not work as you plan.
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

Post by ReaLz »

Ok!!! thank you :) I did it.
But.... I still can't change the flags that .su works :/
only +n can use it...
«A fantastic spaghetti is a spaghetti that does not exist»
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

As noted in my previous thread, it's not allways only the bind that plays part in who can use a command.

Binds are the simplest form.

One example is channel script.

Is a command called "kill" was made for +v (voice) users upwards to kick people. However, you don't want them to kick users with +o or better, but +m users can kick anyone.

Thus, inside the proc, you do some checking to see who is who, and who is allowed to do what.

This same principle can be applied to some of the built in commands. As such, direct source re-programming of these commands will need to take place.

Alternativly, you can totaly recreate the commands, in pure Tcl, too which they can be tailored to whatever your needs.
Locked