Index: trunk/tools/wmib/Core.cs |
— | — | @@ -545,11 +545,11 @@ |
546 | 546 | { |
547 | 547 | if ( parameters > 1) |
548 | 548 | { |
549 | | - int curr = 0; |
550 | | - while ( parameters >= curr ) |
| 549 | + int curr = 1; |
| 550 | + while ( parameters > curr ) |
551 | 551 | { |
552 | | - curr++; |
553 | 552 | keyv = keyv.Replace("$" + curr.ToString(), p[curr]); |
| 553 | + curr++; |
554 | 554 | } |
555 | 555 | } |
556 | 556 | if (User == "") |
— | — | @@ -1250,7 +1250,7 @@ |
1251 | 1251 | { |
1252 | 1252 | if (text.Contains("PRIVMSG")) |
1253 | 1253 | { |
1254 | | - string info = text.Substring(1, text.IndexOf(":", 2)); |
| 1254 | + string info = text.Substring(1, text.IndexOf(" :", 1) - 1); |
1255 | 1255 | string info_host; |
1256 | 1256 | // we got a message here :) |
1257 | 1257 | if (text.Contains("!") && text.Contains("@")) |
— | — | @@ -1263,9 +1263,8 @@ |
1264 | 1264 | if (info_host.Contains("#")) |
1265 | 1265 | { |
1266 | 1266 | channel = info_host.Substring(info_host.IndexOf("#")); |
1267 | | - channel = channel.Substring(0, channel.IndexOf(" ")); |
1268 | 1267 | message = text.Replace(info, ""); |
1269 | | - message = message.Substring(message.IndexOf(":") + 1); |
| 1268 | + message = message.Substring(message.IndexOf(" :") + 2); |
1270 | 1269 | if (message.Contains(delimiter.ToString() + "ACTION")) |
1271 | 1270 | { |
1272 | 1271 | getAction(message.Replace(delimiter.ToString() +"ACTION", ""), channel, host, nick); |