コード例 #1
0
 protected void handleCommand(Source source, String cmd, String[] parts, String[] cumul) {
   if (cmd.equals("query")) {
     source.report(getText(IRCTextProvider.INTERPRETOR_BAD_CONTEXT, "/query"));
   } else if (cmd.equals("ctcp")) {
     source.report(getText(IRCTextProvider.INTERPRETOR_CANNOT_CTCP_IN_DCCCHAT));
   } else {
     super.handleCommand(source, cmd, parts, cumul);
   }
 }
コード例 #2
0
 protected void say(Source source, String str) {
   Server server = source.getServer();
   if (source.talkable()) {
     source.messageReceived(server.getNick(), str);
     server.say(source.getName(), str);
   } else {
     source.report(getText(IRCTextProvider.INTERPRETOR_NOT_ON_CHANNEL));
   }
 }