View Issue Details

IDProjectCategoryView StatusLast Update
0002137unrealircdpublic2006-05-22 13:31
ReporterStealth Assigned Tosyzop  
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Fixed in Version3.2.5 
Summary0002137: real command aliases
Description[*editted*]
Make real command aliases, like /blah -> /motd irc.main.net, /ban -> /kline, etc etc.
Additional InformationORIGINAL REPORT:
I think people should be able to use IRC as the target in alias blocks. This change would be good to have, now that alias blocks have the %n variable in the parameters option.

I am sure that this can cause some problems with clients sending messages directly to IRC@server. I have come up with 2 solutions to it:

[1]: Only allow messages to [email protected]. This would stop clients from sending messages to [email protected].

[2]: Make IRC only accept IRC@server messages from alias blocks.

A tweak like this will be very useful :)
TagsNo tags attached.
3rd party modules

Activities

syzop

2004-10-26 14:29

administrator   ~0008120

What exactly do you mean? 'irc' (and 'ircd') is an (highly) illegal nickname to use. {didn't read the alias stuff}

Stealth

2004-10-26 14:58

reporter   ~0008121

For making command aliases. Ex:

alias blah {
  nick IRC;
  type normal;
};

(if there were a format, it can be like "command %1-")

Currently, if the target is IRC, you will get "No such nickname". This is because the alias blocks send the params to nick@server (i believe).

This post is basically here to allow us to make command aliases in the conf, which alot of people might think is very useful.

syzop

2004-10-26 15:08

administrator   ~0008122

Well, I don't get it, probably because I know the source code and you got different view of how things work, but anyway...

Are you just asking for command aliases?
Like... (stupid example):
/bla -> /motd irc.mainserv.net
(and of course the more complex ones)

If so, then I'll rename the bugreport and make it a bit more clear. If not, then I'm lost and hopefully someone else will understand :P.

Stealth

2004-10-26 15:12

reporter   ~0008123

Yes, that is exactly what im getting at!

I think there was already a commad alias suggestion and it was turned down.. So, I found a small workaround (that did not work) and am suggesting a tweak to fix it.

syzop

2004-10-26 15:34

administrator   ~0008124

Ok, well, I'm gonna rename it regardless ;).
I see indeed that command aliases is on codemastr's TODO for Unreal 3.3.

codemastr

2004-10-27 14:07

reporter   ~0008129

The main reason this has not yet been done is modules. When the alias {} is parsed, we do not yet know what commands are loaded. Therefore, if you say make "a" go to "kick" we don't yet know whether kick exists! So it makes error checking pretty much impossible. So far, I have not come up with a way to overcome this.

syzop

2004-10-30 12:07

administrator   ~0008185

Perhaps just do all (syntax) checks (except "does the cmd exist") @ TEST.
And then, after the rehash/load is done (and all commands are ready).. loop trough some list again and remove any aliases that no cmd is present for and config_error() with something like "alias blahblah refers to command BLIH which does not exist -- disabled" or whatever.

aquanight

2004-11-06 12:57

reporter   ~0008261

Just don't let so-called "command aliases" alias an alias :P . That'd be kinda silly if you ask me :) , but I wouldn't doubt someone would try it.

Blaza

2005-10-10 11:20

reporter   ~0010569

And maybe, in addition to %n for the nick of the user calling it, also have %c for the channel they are sending the command from, which would allow for shortcuts, like for example, /aop add blah (instead of: /msg chanserv aop #chan add blah) which would be a nice shortcur if you're in the channel. Theres probably many more examples this could come in handy for :)

aquanight

2005-10-10 12:43

reporter   ~0010570

Last edited: 2005-10-10 12:43

And unreal knows which channel it's "coming from" how? The concept of channel windows and seperate input boxes for each window is a client-side deal, and is completely invisible to unreal. The only way unreal can know which channel it "came from" is if the channel is in the message itself!

Blaza

2005-10-10 15:11

reporter   ~0010576

I thought the IRC server *has* to know, how else does it generate the list of channels you're in when someone does a whois?

Stealth

2005-10-10 15:38

reporter   ~0010577

Last edited: 2005-10-10 15:39

The IRCd only knows the channel if the command was sent to a channel. The IRCd makes that list of channels because it knows what channels you are in... It cannot automatically tell what channel window a command was sent from. This is why commands like MODE and KICK require a channel parameter. IRCd's relay data, they don't mind read.

EDIT: All the windows and pretties you see in your client, are made and maintained by your client. The IRCd can care less if there is a window for each channel or not.

syzop

2006-05-21 14:09

administrator   ~0011746

I'm considering doing this, but.. could someone give me a good example of when this will be useful? So I could for example mention that in the docs/changelog as an example... :p

The only one I have is '/BLAH' to '/MOTD irc.main.net' but.. that one doesn't exactly look impressive...

Dukat

2006-05-22 03:09

reporter   ~0011747

We could finally add a /umode command mapped to /mode %n %1-
Or even a /whoami command...

Maybe it could help "newbies" so they just have to type /something to join the #help channel or a #celebrity-chat channel after an announcement (ok, if you can't even type /join #channel... oh well)

It could also help making the transition from another IRCd to Unreal easier by keeping some of the old commands (fjoin -> sajoin).

Opers could use predefined commands to have a common practice handling certain situations (/glinebot <bot> -> /gline %1 2d Bots are not allowed, read the faq at http://blablabla or bla).

syzop

2006-05-22 07:40

administrator   ~0011750

Thanks for the examples Dukat, I like the /glinebot, I'll use that one :)

syzop

2006-05-22 13:31

administrator   ~0011752

- Added 'real' aliases, this are aliases that map to real commands, so you can for example
  map the command '/GLINEBOT <x>' to 'GLINE <x> 2d Bots are not allowed on this server, blabla'.
  See the documentation on the alias block for more information. doc/example.conf contains an
  example as well (search for "glinebot").

Issue History

Date Modified Username Field Change
2004-10-26 14:24 Stealth New Issue
2004-10-26 14:29 syzop Note Added: 0008120
2004-10-26 14:58 Stealth Note Added: 0008121
2004-10-26 15:08 syzop Note Added: 0008122
2004-10-26 15:12 Stealth Note Added: 0008123
2004-10-26 15:34 syzop Note Added: 0008124
2004-10-26 15:36 syzop Severity tweak => feature
2004-10-26 15:36 syzop Summary Allow messages to IRC@server => real command aliases
2004-10-26 15:36 syzop Description Updated
2004-10-26 15:36 syzop Additional Information Updated
2004-10-27 14:07 codemastr Note Added: 0008129
2004-10-30 12:07 syzop Note Added: 0008185
2004-11-06 12:57 aquanight Note Added: 0008261
2005-10-10 11:20 Blaza Note Added: 0010569
2005-10-10 12:43 aquanight Note Added: 0010570
2005-10-10 12:43 aquanight Note Edited: 0010570
2005-10-10 15:11 Blaza Note Added: 0010576
2005-10-10 15:38 Stealth Note Added: 0010577
2005-10-10 15:39 Stealth Note Edited: 0010577
2006-05-21 14:09 syzop Note Added: 0011746
2006-05-22 03:09 Dukat Note Added: 0011747
2006-05-22 07:40 syzop Note Added: 0011750
2006-05-22 13:31 syzop Status new => resolved
2006-05-22 13:31 syzop Fixed in Version => 3.2.5
2006-05-22 13:31 syzop Resolution open => fixed
2006-05-22 13:31 syzop Assigned To => syzop
2006-05-22 13:31 syzop Note Added: 0011752