aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--CONTRIBUTORS.txt4
-rw-r--r--OpenSim/Region/Environment/Modules/ChatModule.cs21
-rw-r--r--bin/OpenSim.ini.example14
3 files changed, 33 insertions, 6 deletions
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index 263bb90..4379771 100644
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -23,8 +23,8 @@ OpenSim Developers
23* Danx0r 23* Danx0r
24* Dalien 24* Dalien
25* Darok 25* Darok
26* chi11ken 26* chi11ken (3Di)
27* adjohn 27* adjohn (3Di)
28* Alondria 28* Alondria
29 29
30Patches 30Patches
diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs
index 5ca0ed7..749a923 100644
--- a/OpenSim/Region/Environment/Modules/ChatModule.cs
+++ b/OpenSim/Region/Environment/Modules/ChatModule.cs
@@ -154,6 +154,8 @@ namespace OpenSim.Region.Environment.Modules
154 } 154 }
155 client.OnLogout += ClientLoggedOut; 155 client.OnLogout += ClientLoggedOut;
156 client.OnConnectionClosed += ClientLoggedOut; 156 client.OnConnectionClosed += ClientLoggedOut;
157 //client.OnDisconnectUser += ClientLoggedOut;
158 client.OnLogout += ClientLoggedOut;
157 } 159 }
158 catch (Exception ex) 160 catch (Exception ex)
159 { 161 {
@@ -323,6 +325,7 @@ namespace OpenSim.Region.Environment.Modules
323 private string m_nick = null; 325 private string m_nick = null;
324 private string m_basenick = null; 326 private string m_basenick = null;
325 private string m_channel = null; 327 private string m_channel = null;
328 private string m_privmsgformat = "PRIVMSG {0} :<{1} in {2}>: {3}";
326 329
327 private NetworkStream m_stream; 330 private NetworkStream m_stream;
328 private TcpClient m_tcp; 331 private TcpClient m_tcp;
@@ -356,7 +359,13 @@ namespace OpenSim.Region.Environment.Modules
356 // ; USER <irc_user> <visible=8,invisible=0> * : <IRC_realname> 359 // ; USER <irc_user> <visible=8,invisible=0> * : <IRC_realname>
357 // channel = #opensim-regions 360 // channel = #opensim-regions
358 // port = 6667 361 // port = 6667
359 // 362 // ;MSGformat fields : 0=botnick, 1=user, 2=region, 3=message
363 // ;for <bot>:<user in region> :<message>
364 // ;msgformat = "PRIVMSG {0} :<{1} in {2}>: {3}"
365 // ;for <bot>:<message> - <user of region> :
366 // ;msgformat = "PRIVMSG {0} : {3} - {1} of {2}"
367 // ;for <bot>:<message> - from <user> :
368 // ;msgformat = "PRIVMSG {0} : {3} - from {1}"
360 // Traps I/O disconnects so it does not crash the sim 369 // Traps I/O disconnects so it does not crash the sim
361 // Trys to reconnect if disconnected and someone says something 370 // Trys to reconnect if disconnected and someone says something
362 // Tells IRC server "QUIT" when doing a close (just to be nice) 371 // Tells IRC server "QUIT" when doing a close (just to be nice)
@@ -370,6 +379,7 @@ namespace OpenSim.Region.Environment.Modules
370 m_channel = config.Configs["IRC"].GetString("channel"); 379 m_channel = config.Configs["IRC"].GetString("channel");
371 m_port = (uint) config.Configs["IRC"].GetInt("port", (int) m_port); 380 m_port = (uint) config.Configs["IRC"].GetInt("port", (int) m_port);
372 m_user = config.Configs["IRC"].GetString("username", m_user); 381 m_user = config.Configs["IRC"].GetString("username", m_user);
382 m_privmsgformat = config.Configs["IRC"].GetString("msgformat", m_privmsgformat);
373 if (m_server != null && m_nick != null && m_channel != null) 383 if (m_server != null && m_nick != null && m_channel != null)
374 { 384 {
375 m_nick = m_nick + Util.RandomClass.Next(1, 99); 385 m_nick = m_nick + Util.RandomClass.Next(1, 99);
@@ -456,7 +466,14 @@ namespace OpenSim.Region.Environment.Modules
456 466
457 try 467 try
458 { 468 {
459 m_writer.WriteLine("PRIVMSG {0} :<{1} in {2}>: {3}", m_channel, from, region, msg); 469 if (m_privmsgformat == null)
470 {
471 m_writer.WriteLine("PRIVMSG {0} :<{1} in {2}>: {3}", m_channel, from, region, msg);
472 }
473 else
474 {
475 m_writer.WriteLine(m_privmsgformat, m_channel, from, region, msg);
476 }
460 m_writer.Flush(); 477 m_writer.Flush();
461 m_log.Verbose("IRC", "PrivMsg " + from + " in " + region + " :" + msg); 478 m_log.Verbose("IRC", "PrivMsg " + from + " in " + region + " :" + msg);
462 } 479 }
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index 55d261c..3bcbdd2 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -18,10 +18,10 @@ physics = basicphysics
18 18
19; *** Prim Storage - only leave one storage_plugin uncommented *** 19; *** Prim Storage - only leave one storage_plugin uncommented ***
20; --- The NullStorage stores nothing - effectively disabling persistence: 20; --- The NullStorage stores nothing - effectively disabling persistence:
21; storage_plugin = "OpenSim.DataStore.NullStorage.dll" 21storage_plugin = "OpenSim.DataStore.NullStorage.dll"
22 22
23; --- To use sqlite as region storage: 23; --- To use sqlite as region storage:
24storage_plugin = "OpenSim.Framework.Data.SQLite.dll" 24;storage_plugin = "OpenSim.Framework.Data.SQLite.dll"
25storage_connection_string="URI=file:OpenSim.db,version=3"; 25storage_connection_string="URI=file:OpenSim.db,version=3";
26 26
27; --- To use MySQL storage, supply your own connectionstring (this is only an example): 27; --- To use MySQL storage, supply your own connectionstring (this is only an example):
@@ -99,6 +99,15 @@ shout_distance = 100
99;server = name.of.irc.server.on.the.net 99;server = name.of.irc.server.on.the.net
100;nick = OpenSimBotNameProbablyMakeThisShorter 100;nick = OpenSimBotNameProbablyMakeThisShorter
101;channel = #the_irc_channel_you_want_to_connect_to 101;channel = #the_irc_channel_you_want_to_connect_to
102;port = 6667
103;MSGformat fields : 0=botnick, 1=user, 2=region, 3=message
104; must start with "PRIVMSG {0} : " or irc server will get upset
105;for <bot>:<user in region> :<message>
106;msgformat = "PRIVMSG {0} :<{1} in {2}>: {3}"
107;for <bot>:<message> - <user of region> :
108msgformat = "PRIVMSG {0} : {3} - {1} of {2}"
109;for <bot>:<message> - from <user> :
110;msgformat = "PRIVMSG {0} : {3} - from {1}"
102 111
103; Uncomment the following to control the progression of daytime 112; Uncomment the following to control the progression of daytime
104; in the Sim. The defaults are what is shown below 113; in the Sim. The defaults are what is shown below
@@ -231,3 +240,4 @@ CompileWithDebugInformation=true
231; Remove old scripts on next startup 240; Remove old scripts on next startup
232CleanUpOldScriptsOnStartup=true 241CleanUpOldScriptsOnStartup=true
233 242
243