Add voice support in config files
This commit is contained in:
parent
80ea20b94d
commit
9fcb953ba5
4 changed files with 10 additions and 2 deletions
|
@ -9,6 +9,7 @@ join ^Мерзавец(.+)?!.* \kickban requested
|
|||
join ^Мальчиш_плохишь!.* \kick плохой!
|
||||
join ^Мальчиш_плохишь!.* \ban \privmsg не возвращайся!
|
||||
nick ^Мимикрирую_под.* \chanmsg перестань!
|
||||
nick ^МилашкаБеляш.* \voice
|
||||
|
||||
#event regexp to trigger CTCP (send to chan/privmsg) message printed if not found
|
||||
msg ^cci.* \cclientinfo (^.+(\s|\t)+) нет таких:
|
||||
|
|
|
2
pom.xml
2
pom.xml
|
@ -4,7 +4,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>loper</groupId>
|
||||
<artifactId>InnaIrcBot</artifactId>
|
||||
<version>0.6-SNAPSHOT</version>
|
||||
<version>0.7-SNAPSHOT</version>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
<name>InnaIrcBot</name>
|
||||
|
|
|
@ -120,6 +120,10 @@ public class ChanelCommander implements Runnable {
|
|||
banAction(arg2);
|
||||
i++;
|
||||
break;
|
||||
case "\\voice":
|
||||
voiceAction(arg2);
|
||||
i++;
|
||||
break;
|
||||
case "\\kick":
|
||||
whatToSendList = new ArrayList<>();
|
||||
for (i++; (i < cmdOrMsg.length) && !(cmdOrMsg[i].startsWith("\\")); i++)
|
||||
|
@ -216,6 +220,9 @@ public class ChanelCommander implements Runnable {
|
|||
StreamProvider.writeToStream(server, "MODE "+chanel+" +b "+simplifyNick(whom)+"*!*@*");
|
||||
StreamProvider.writeToStream(server, "MODE "+chanel+" +b "+"*!*@"+whom.replaceAll("^.+@",""));
|
||||
}
|
||||
private void voiceAction(String whom){
|
||||
StreamProvider.writeToStream(server, "MODE "+chanel+" +v "+simplifyNick(whom));
|
||||
}
|
||||
private void kickAction(String[] messages, String whom){
|
||||
StringBuilder executiveStr = new StringBuilder();
|
||||
executiveStr.append("KICK ");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package InnaIrcBot;
|
||||
|
||||
public class GlobalData {
|
||||
private static final String version = "InnaIrcBot v0.6 \"Большевик\"";
|
||||
private static final String version = "InnaIrcBot v0.7 \"Комсомолец\"";
|
||||
public static synchronized String getAppVersion(){
|
||||
return version;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue