diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs index 01099e9..16fd753 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs | |||
@@ -237,7 +237,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
237 | { | 237 | { |
238 | try | 238 | try |
239 | { | 239 | { |
240 | string clientName = String.Format("{0}{1}", client.FirstName, client.LastName); | 240 | string clientName = String.Format("{0} {1}", client.FirstName, client.LastName); |
241 | 241 | ||
242 | client.OnChatFromViewer += SimChat; | 242 | client.OnChatFromViewer += SimChat; |
243 | client.OnLogout += ClientLoggedOut; | 243 | client.OnLogout += ClientLoggedOut; |
@@ -250,7 +250,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
250 | m_log.DebugFormat("[IRC] {0} logging on", clientName); | 250 | m_log.DebugFormat("[IRC] {0} logging on", clientName); |
251 | m_irc.PrivMsg(m_irc.Nick, "Sim", | 251 | m_irc.PrivMsg(m_irc.Nick, "Sim", |
252 | String.Format("notices {0} logging on", clientName)); | 252 | String.Format("notices {0} logging on", clientName)); |
253 | m_irc.NewUser(clientName); | ||
254 | } | 253 | } |
255 | m_last_new_user = clientName; | 254 | m_last_new_user = clientName; |
256 | } | 255 | } |
@@ -285,10 +284,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
285 | if ((m_irc.Enabled) && (m_irc.Connected)) | 284 | if ((m_irc.Enabled) && (m_irc.Connected)) |
286 | { | 285 | { |
287 | string regionName = presence.Scene.RegionInfo.RegionName; | 286 | string regionName = presence.Scene.RegionInfo.RegionName; |
288 | string clientName = String.Format("{0}{1}", presence.Firstname, presence.Lastname); | 287 | string clientName = String.Format("{0} {1}", presence.Firstname, presence.Lastname); |
289 | m_log.DebugFormat("[IRC] noticing {0} in {1}", clientName, regionName); | 288 | m_log.DebugFormat("[IRC] noticing {0} in {1}", clientName, regionName); |
290 | m_irc.PrivMsg(m_irc.Nick, "Sim", String.Format("notices {0} left {1}", clientName, regionName)); | 289 | m_irc.PrivMsg(m_irc.Nick, "Sim", String.Format("notices {0} left {1}", clientName, regionName)); |
291 | m_irc.RemoveUser(clientName); | ||
292 | } | 290 | } |
293 | } | 291 | } |
294 | catch (Exception) | 292 | catch (Exception) |
@@ -484,8 +482,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
484 | listener.Start(); | 482 | listener.Start(); |
485 | ThreadTracker.Add(listener); | 483 | ThreadTracker.Add(listener); |
486 | 484 | ||
487 | NewUser(m_user); | 485 | m_writer.WriteLine(m_user); |
488 | 486 | m_writer.Flush(); | |
487 | m_writer.WriteLine(String.Format("NICK {0}", m_nick)); | ||
488 | m_writer.Flush(); | ||
489 | m_writer.WriteLine(String.Format("JOIN {0}", m_channel)); | ||
490 | m_writer.Flush(); | ||
489 | m_log.Info("[IRC]: Connection fully established"); | 491 | m_log.Info("[IRC]: Connection fully established"); |
490 | m_connected = true; | 492 | m_connected = true; |
491 | } | 493 | } |
@@ -498,21 +500,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
498 | } | 500 | } |
499 | } | 501 | } |
500 | 502 | ||
501 | public void NewUser(string nick) | ||
502 | { | ||
503 | m_writer.WriteLine(nick); | ||
504 | m_writer.Flush(); | ||
505 | m_writer.WriteLine(String.Format("NICK {0}", m_nick)); | ||
506 | m_writer.Flush(); | ||
507 | m_writer.WriteLine(String.Format("JOIN {0}", m_channel)); | ||
508 | m_writer.Flush(); | ||
509 | } | ||
510 | |||
511 | public void RemoveUser(string nick) | ||
512 | { | ||
513 | m_writer.WriteLine(String.Format("QUIT :{0}", nick)); | ||
514 | } | ||
515 | |||
516 | public void Reconnect() | 503 | public void Reconnect() |
517 | { | 504 | { |
518 | m_connected = false; | 505 | m_connected = false; |