~twpol/chatzilla/tests

« back to all changes in this revision

Viewing changes to xul/content/commands.js

  • Committer: James Ross
  • Date: 2008-12-21 21:49:00 UTC
  • mfrom: (1123.1.24)
  • Revision ID: silver@warwickcompsoc.co.uk-20081221214900-9l6cxp2cbn0f7a78
Merged to trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
192
192
         ["toggle-ui",         cmdToggleUI,                        CMD_CONSOLE],
193
193
         ["toggle-pref",       cmdTogglePref,                                0],
194
194
         ["topic",             cmdTopic,           CMD_NEED_CHAN | CMD_CONSOLE],
 
195
         ["unalias",           cmdAlias,                           CMD_CONSOLE],
195
196
         ["unignore",          cmdIgnore,           CMD_NEED_NET | CMD_CONSOLE],
196
197
         ["unban",             cmdBanOrExcept,     CMD_NEED_CHAN | CMD_CONSOLE],
197
198
         ["unexcept",          cmdBanOrExcept,     CMD_NEED_CHAN | CMD_CONSOLE],
2816
2817
 
2817
2818
    var ary;
2818
2819
 
2819
 
    if (e.commandList == "-")
 
2820
    if ((e.commandList == "-") || (e.command.name == "unalias"))
2820
2821
    {
2821
2822
        /* remove alias */
2822
2823
        ary = getAlias(e.aliasName);
2832
2833
 
2833
2834
        feedback(e, getMsg(MSG_ALIAS_REMOVED, e.aliasName));
2834
2835
    }
2835
 
    else if (e.aliasName)
 
2836
    else if (e.aliasName && e.commandList)
2836
2837
    {
2837
2838
        /* add/change alias */
2838
2839
        client.commandManager.defineCommand(e.aliasName, e.commandList);
2846
2847
 
2847
2848
        feedback(e, getMsg(MSG_ALIAS_CREATED, [e.aliasName, e.commandList]));
2848
2849
    }
 
2850
    else if (e.aliasName)
 
2851
    {
 
2852
        /* display alias */
 
2853
        ary = getAlias(e.aliasName);
 
2854
        if (!ary)
 
2855
            display(getMsg(MSG_NOT_AN_ALIAS, e.aliasName), MT_ERROR);
 
2856
        else
 
2857
            display(getMsg(MSG_FMT_ALIAS, [e.aliasName, ary[1]]));
 
2858
    }
2849
2859
    else
2850
2860
    {
2851
2861
        /* list aliases */