ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/uk/org/iscream/cms/server/client/alerters/IRC__Alerter.java
(Generate patch)

Comparing projects/cms/source/server/uk/org/iscream/cms/server/client/alerters/IRC__Alerter.java (file contents):
Revision 1.30.2.5 by tdb, Tue Feb 5 22:39:29 2002 UTC vs.
Revision 1.30.2.6 by tdb, Wed Feb 6 22:59:06 2002 UTC

# Line 410 | Line 410 | public class IRC__Alerter extends AlerterSkeleton {
410          public void onNickChange(String oldNick, String login, String hostname, String newNick) {
411              if(oldNick.equals(_nickname)) {
412                  _nickname = newNick;
413 +                // tell the underlying pircbot that our nick has changed too :)
414 +                setName(newNick);
415              }
416          }
417          
# Line 448 | Line 450 | public class IRC__Alerter extends AlerterSkeleton {
450           * This method handles input directed to us, and
451           * responds accordingly if required.
452           *
451         * nb. matching user input is quite bad right now,
452         *     and should be improved one day.
453         *
453           * @param message the message from someone
454           * @param source where the message came from, so we know where to send the response
455           */
# Line 479 | Line 478 | public class IRC__Alerter extends AlerterSkeleton {
478                  return;
479              }
480              
482            // see if the message matches (loosely!) any
483            // of our known commands
481              if(message.equalsIgnoreCase(stopCommand)) {
482                  _active = false;
483                  sendMessage(source, "alerts have been stopped");
# Line 511 | Line 508 | public class IRC__Alerter extends AlerterSkeleton {
508                  }
509                  
510              }
511 <            else if(message.equalsIgnoreCase(joinCommand)) {
511 >            else if(message.toLowerCase().startsWith(joinCommand.toLowerCase())) {
512                  String joinCmd = joinCommand;
513                  String newChan = message.substring(message.indexOf(joinCmd) + joinCmd.length() + 1);
514                  int endOfChan = newChan.indexOf(" ");
# Line 527 | Line 524 | public class IRC__Alerter extends AlerterSkeleton {
524                      _channel = newChan;
525                  }
526              }
527 <            else if(message.equalsIgnoreCase(nickChangeCommand)) {
527 >            else if(message.toLowerCase().startsWith(nickChangeCommand.toLowerCase())) {
528                  String nickChangeCmd = nickChangeCommand;
529                  String newNick = message.substring(message.indexOf(nickChangeCmd) + nickChangeCmd.length() + 1);
530                  int endOfNick = newNick.indexOf(" ");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines