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