View Issue Details

IDProjectCategoryView StatusLast Update
0002722unrealircdpublic2006-05-17 07:47
ReporterNazzy Assigned Tosyzop  
Status resolvedResolutionfixed 
OSLinuxOS Version2.6 
Product Version3.2.4 
Fixed in Version3.2.5 
Summary0002722: Command type alias's tweak + semi-related bug fix
DescriptionThis was raised by mooman ...

the following block does not work as expected:

alias "moo" {
  format ".*" {
    target MyBot;
    type normal;
    parameters "MOO!";
  type command;

It would be expected that just "/moo" without any parameters would work, alas it does not. The attached patch adjusts the way it deals with missing params. If a command alias is called without any parameters it will run it's logic as normal with an empty param string, then check the actual size of the output.

This also fixes the fact that channel command aliases plain didn't work right (they sent the parameters to the channel instead of the parsed format string).

While I'm not sure if "/moo" was supposed to give an error, this does seem a sensible behaviour.

PS: While this fix has been tested, I can't guarentee my code isn't a little odd due to me being really tired ;) I'd appreciate someone checking it.
TagsNo tags attached.
3rd party modules


child of 0002748 closedsyzop 3.2.5 Release 


2005-12-21 04:12



2006-01-16 15:54

administrator   ~0010969

I've put the command aliases fix in cvs, will consider the rest post-3.2.4, it doesn't directly sound like a bad idea, just needs some thoughts.. ;).

Thanks for the patch.


2006-05-17 07:47

administrator   ~0011722

Rest of the patch is now in CVS as well.
Patch was committed almost unchanged, except I ditched the parc < 1 thing which never happens (not that keeping it would have caused anything bad).


CVS .504:
- Made empty command aliases work (no more "no text to send" error) if the alias finds it ok,
  which basically means if it allows .*. If you want to require a parameter, use .+ (or
  anything other in regex that requires at least one character). Suggested and patch provided
  by Nazzy (0002722).

Issue History

Date Modified Username Field Change
2005-12-21 04:12 Nazzy New Issue
2005-12-21 04:12 Nazzy File Added: src_s_svs_aliases.patch
2005-12-23 09:16 syzop Status new => confirmed
2006-01-16 15:54 syzop Note Added: 0010969
2006-01-16 16:15 syzop Relationship added child of 0002748
2006-05-17 07:47 syzop Status confirmed => resolved
2006-05-17 07:47 syzop Fixed in Version => 3.2.5
2006-05-17 07:47 syzop Resolution open => fixed
2006-05-17 07:47 syzop Assigned To => syzop
2006-05-17 07:47 syzop Note Added: 0011722