aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorSean Dague2008-06-06 20:21:25 +0000
committerSean Dague2008-06-06 20:21:25 +0000
commit2cfdfaeaa5580750a6469fee7376f12fda850275 (patch)
treea2f9b58abab2563a93dcddb864c4ab1c10e998db /OpenSim
parent* Adds semi broken PRIM_FLEXIBLE support for prim. It's semi-broken because... (diff)
downloadopensim-SC_OLD-2cfdfaeaa5580750a6469fee7376f12fda850275.zip
opensim-SC_OLD-2cfdfaeaa5580750a6469fee7376f12fda850275.tar.gz
opensim-SC_OLD-2cfdfaeaa5580750a6469fee7376f12fda850275.tar.bz2
opensim-SC_OLD-2cfdfaeaa5580750a6469fee7376f12fda850275.tar.xz
experimental IRC changes, because it's friday, and I'm curious if this
will work.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs29
1 files changed, 21 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
index 16fd753..01099e9 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,6 +250,7 @@ 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);
253 } 254 }
254 m_last_new_user = clientName; 255 m_last_new_user = clientName;
255 } 256 }
@@ -284,9 +285,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
284 if ((m_irc.Enabled) && (m_irc.Connected)) 285 if ((m_irc.Enabled) && (m_irc.Connected))
285 { 286 {
286 string regionName = presence.Scene.RegionInfo.RegionName; 287 string regionName = presence.Scene.RegionInfo.RegionName;
287 string clientName = String.Format("{0} {1}", presence.Firstname, presence.Lastname); 288 string clientName = String.Format("{0}{1}", presence.Firstname, presence.Lastname);
288 m_log.DebugFormat("[IRC] noticing {0} in {1}", clientName, regionName); 289 m_log.DebugFormat("[IRC] noticing {0} in {1}", clientName, regionName);
289 m_irc.PrivMsg(m_irc.Nick, "Sim", String.Format("notices {0} left {1}", clientName, regionName)); 290 m_irc.PrivMsg(m_irc.Nick, "Sim", String.Format("notices {0} left {1}", clientName, regionName));
291 m_irc.RemoveUser(clientName);
290 } 292 }
291 } 293 }
292 catch (Exception) 294 catch (Exception)
@@ -482,12 +484,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
482 listener.Start(); 484 listener.Start();
483 ThreadTracker.Add(listener); 485 ThreadTracker.Add(listener);
484 486
485 m_writer.WriteLine(m_user); 487 NewUser(m_user);
486 m_writer.Flush(); 488
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();
491 m_log.Info("[IRC]: Connection fully established"); 489 m_log.Info("[IRC]: Connection fully established");
492 m_connected = true; 490 m_connected = true;
493 } 491 }
@@ -500,6 +498,21 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
500 } 498 }
501 } 499 }
502 500
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
503 public void Reconnect() 516 public void Reconnect()
504 { 517 {
505 m_connected = false; 518 m_connected = false;