- // Check nick change
- var message;
- var re = /^\/nick (.*)/;
- var match = re.exec(input);
- if (match) {
- message = "*** " + rcnick() + " is now known as " + match[1];
- rcsetnick(match[1]);
- } else {
- message = "<" + rcnick() + "> " + input;
- }
-
- // /me support
- var message;
- var re = /^\/me (.*)/;
- var match = re.exec(input);
- var inputme = input.substring(4);
- if (match) {
- message = "* " + rcnick() + " " + inputme;
- } else {
- message = "<" + rcnick() + "> " + input;
- }
-
- // Say the message
- var d = rcaddmessagetohistory(message);
- rcsend(d, message);
-
- // Remind people to set their nick
- if (rcnick() == 'anonymous') {
- rcaddmessagetohistory("-!- Set your nick with /nick");
- }