+
+ // 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;
+ }
+
+ // Remind people to set their nick
+ if (rcnick() == 'anonymous') {
+ rcaddmessagetohistory("-!- Set your nick with /nick");
+ }
+
+ // Say the message
+ var d = rcaddmessagetohistory(message);
+ rcsend(d, message);