|
@@ -273,6 +273,8 @@ public class BigScreenBot extends Bot
|
|
|
switch (arguments.length)
|
|
|
{
|
|
|
case 0:
|
|
|
+ sendMessage(channel, sender, "searching for devices to pair with...");
|
|
|
+
|
|
|
new Thread()
|
|
|
{
|
|
|
@Override
|
|
@@ -301,6 +303,8 @@ public class BigScreenBot extends Bot
|
|
|
|
|
|
break;
|
|
|
case 1:
|
|
|
+ sendMessage(channel, sender, String.format("starting to pair with device (\"%1$s\")...", arguments[0]));
|
|
|
+
|
|
|
new Thread()
|
|
|
{
|
|
|
@Override
|
|
@@ -310,7 +314,7 @@ public class BigScreenBot extends Bot
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- remote.beginPairDevice(arguments[0]);
|
|
|
+ remote.startPairDevice(arguments[0]);
|
|
|
}
|
|
|
catch (GeneralSecurityException exception)
|
|
|
{
|
|
@@ -322,6 +326,19 @@ public class BigScreenBot extends Bot
|
|
|
|
|
|
break;
|
|
|
default:
|
|
|
+ sendMessage(channel, sender, String.format("finishing pairing with device (\"%1$s\")...", arguments[0]));
|
|
|
+
|
|
|
+ new Thread()
|
|
|
+ {
|
|
|
+ @Override
|
|
|
+ public void run()
|
|
|
+ {
|
|
|
+ synchronized (remote)
|
|
|
+ {
|
|
|
+ remote.finishPairDevice(arguments[0], arguments[1]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }.start();
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -513,8 +530,11 @@ public class BigScreenBot extends Bot
|
|
|
{
|
|
|
boolean admin = matchNickMasks(sender, login, hostname, admins);
|
|
|
|
|
|
- if (!admin && (matchNickMasks(sender, login, hostname, bans.values()) || !isNickInChannels(sender)))
|
|
|
- return;
|
|
|
+ synchronized (bans)
|
|
|
+ {
|
|
|
+ if (!admin && (matchNickMasks(sender, login, hostname, bans.values()) || !isNickInChannels(sender)))
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
message = Colors.removeFormattingAndColors(message);
|
|
|
|