Add voice support in config files

This commit is contained in:
Dmitry Isaenko 2020-03-24 02:01:25 +03:00
parent 80ea20b94d
commit 9fcb953ba5
4 changed files with 10 additions and 2 deletions

View file

@ -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)+) нет таких:

1 # NOTE: Filename should be servername#channel OR servernamechannel (is started not from '#'). It MUST have .csv extension and hold tab-separated-values. This example works for server='srv' and channel='#lpr'
9 join ^Мальчиш_плохишь!.* \kick плохой!
10 join ^Мальчиш_плохишь!.* \ban \privmsg не возвращайся!
11 nick ^Мимикрирую_под.* \chanmsg перестань!
12 nick ^МилашкаБеляш.* \voice
13 #event regexp to trigger CTCP (send to chan/privmsg) message printed if not found
14 msg ^cci.* \cclientinfo (^.+(\s|\t)+) нет таких:
15 msg ^cf.* \cfinger (^.+(\s|\t)+) не понятно кто это:

View file

@ -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>

View file

@ -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 ");

View file

@ -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;
}