Adding/editing commands.
-
- Posts: 62
- Joined: Sun Nov 14, 2004 2:55 am
- Location: Texas
- Contact:
Adding/editing commands.
I was wondering how to add/edit commands. I thought there was no /umode but learned there was a /umode2.. confused some users so i was going to try to change it.. Not sure if i have to create a Module to do this or what. Thanks for input
Your face looks like it was set on fire and put out with an axe ;x.
well modifying the code is not supported and adding/changing commands would be doing just that.
There are ways to unload commands that exist without modifying the code which is supported
There are ways to unload commands that exist without modifying the code which is supported
Configuration - https://www.unrealircd.org/docs/Configuration
FAQ - https://www.unrealircd.org/docs/FAQ
FAQ - https://www.unrealircd.org/docs/FAQ
-
- Posts: 62
- Joined: Sun Nov 14, 2004 2:55 am
- Location: Texas
- Contact:
ic, so in other words, i won't find help here on adding/editing the commands? ;P | How do you go on about removing them? Although i don't know of any i want to remove, part of the reason im doing all this is the learn as much about all this stuff as i can so.. still interested
Your face looks like it was set on fire and put out with an axe ;x.
removing some commands are rather easy, simply because they are in the form of modules. take sjoin for example.chevyman2002 wrote:ic, so in other words, i won't find help here on adding/editing the commands? ;P | How do you go on about removing them? Although i don't know of any i want to remove, part of the reason im doing all this is the learn as much about all this stuff as i can so.. still interested
If you exchange
Code: Select all
loadmodule "modules/commands.so";
Code: Select all
loadmodule "modules/m_*.so";
Configuration - https://www.unrealircd.org/docs/Configuration
FAQ - https://www.unrealircd.org/docs/FAQ
FAQ - https://www.unrealircd.org/docs/FAQ
Well, as far as I know, module coding is somewhat supported, that's why this forum exists here, and adding/editing/removing commands can be done through 3rd party modules.
To add a new command, module coders generally use CommandAdd, to remove, CommandDel, and to modify the behaviour of a command, CmdoverrideAdd.
However, CommandDel might not be useful to remove, for example, command UMODE2. This command - among many others - is added with function add_Command that leaves out creating module objects, so you might want to use del_Command, but it will be much more tricky...
Oh, and the best way to learn about module coding is to read the UnrealIRCd source code a lot.
To add a new command, module coders generally use CommandAdd, to remove, CommandDel, and to modify the behaviour of a command, CmdoverrideAdd.
However, CommandDel might not be useful to remove, for example, command UMODE2. This command - among many others - is added with function add_Command that leaves out creating module objects, so you might want to use del_Command, but it will be much more tricky...
Oh, and the best way to learn about module coding is to read the UnrealIRCd source code a lot.
-
- Posts: 62
- Joined: Sun Nov 14, 2004 2:55 am
- Location: Texas
- Contact:
-
- Posts: 62
- Joined: Sun Nov 14, 2004 2:55 am
- Location: Texas
- Contact:
Ya, the /umode2 thing isn't a big problem or anything, i can simply tell users how to do that or something. I was debating adding a few very simple commands for services. Like on ConferenceRoom, when you type "/ns" -- it sends "/ns help" rather than "no text to send." Just minor things like that, and might would add a couple commands that i'd like to see that weren't only for U:Lines (such as sqline). Not sure what i'll do yet, for now i may tackle some miscoding on Auspice as /cs close and /ns forbid cause seg faults. Thanks much guys .
Your face looks like it was set on fire and put out with an axe ;x.
This is easy to do.chevyman2002 wrote:Like on ConferenceRoom, when you type "/ns" -- it sends "/ns help" rather than "no text to send."
Code: Select all
alias ns {
format "^$" {
target "NickServ";
type services;
parameters "HELP";
};
format "^.+$" {
target "NickServ";
type services;
parameters "%1-";
};
type command;
};
Last edited by aquanight on Mon Nov 15, 2004 5:30 am, edited 1 time in total.
-
- Posts: 62
- Joined: Sun Nov 14, 2004 2:55 am
- Location: Texas
- Contact: