When not set the key user try to join no key

This commit is contained in:
Nícolas Lazarte Kaqui 2011-09-20 15:11:38 -03:00
parent 876c331d84
commit c869a07bd6
2 changed files with 14 additions and 8 deletions

View file

@ -57,10 +57,6 @@ namespace SparkleLib {
uri = "irc://204.62.14.135/";
}
if (key == null) {
key = "12345";
}
Uri announce_uri = new Uri (uri);
// We use only one listener per server to keep

View file

@ -111,9 +111,14 @@ namespace SparkleLib {
foreach (string channel in base.channels) {
SparkleHelpers.DebugInfo ("ListenerIrc", "Joining channel " + channel);
this.client.RfcJoin (channel);
if (key != null) {
SparkleHelpers.DebugInfo ("ListenerIrc", "Ussing key");
this.client.RfcJoin (channel, key);
this.client.RfcMode (channel, "+k " + key);
} else {
this.client.RfcJoin (channel);
}
this.client.RfcMode (channel, "+s");
this.client.RfcMode (channel, "+k " + key);
}
// List to the channel, this blocks the thread
@ -140,9 +145,14 @@ namespace SparkleLib {
if (IsConnected) {
SparkleHelpers.DebugInfo ("ListenerIrc", "Joining channel " + channel);
this.client.RfcJoin (channel);
if (key != null) {
SparkleHelpers.DebugInfo ("ListenerIrc", "Ussing key");
this.client.RfcJoin (channel, key);
this.client.RfcMode (channel, "+k " + key);
} else {
this.client.RfcJoin (channel);
}
this.client.RfcMode (channel, "+s");
this.client.RfcMode (channel, "+k " + key);
}
}
}