Skip to content

Commit

Permalink
Adds some common command shortcuts
Browse files Browse the repository at this point in the history
This commit introduces aliases found, among other clients, in irssi:

    /j -> /join
    /t -> /topic
    /q -> /query
  • Loading branch information
hermansc committed Feb 16, 2014
1 parent 2b151f1 commit 0256a90
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions assets/js/client.js
Expand Up @@ -460,6 +460,7 @@ $(function() {

irc.socket.emit('join', connect);
});
irc.commands.alias('j', 'join');

irc.commands.add('list', function(args){
irc.socket.emit('list', args);
Expand Down Expand Up @@ -498,6 +499,7 @@ $(function() {
topic: args.join(' ')});
}
});
irc.commands.alias("t", "topic");

irc.commands.add('whois', function(args){
if (args[0]){
Expand Down Expand Up @@ -526,6 +528,7 @@ $(function() {
});
irc.commands.alias('msg', 'query');
irc.commands.alias('privmsg', 'query');
irc.commands.alias('q', 'query');

irc.commands.add('default', function(args, command){
command = command.substr(1).toUpperCase();
Expand Down

0 comments on commit 0256a90

Please sign in to comment.