Kaynağa Gözat

Fixed issue where if no nickname was specified, command would still look for it (exception).

tags/3.0.5
Teknikode 4 yıl önce
ebeveyn
işleme
5b3a83d3f4
1 değiştirilmiş dosya ile 8 ekleme ve 7 silme
  1. 8
    7
      Modules/Fun/Fun.cs

+ 8
- 7
Modules/Fun/Fun.cs Dosyayı Görüntüle

@@ -13,6 +13,7 @@ namespace Combot.Modules.Plugins
{
Command foundCommand = Commands.Find(c => c.Triggers.Contains(command.Command));
string channel = command.Arguments.ContainsKey("Channel") ? command.Arguments["Channel"] : command.Location;
string nickname = command.Arguments.ContainsKey("Nickname") ? command.Arguments["Nickname"] : command.Nick.Nickname;
switch (foundCommand.Name)
{
case "Love":
@@ -21,25 +22,25 @@ namespace Combot.Modules.Plugins
switch (randNum)
{
case 0:
Bot.IRC.Command.SendCTCPMessage(channel, "ACTION", string.Format("gently makes love to {0}", command.Arguments["Nickname"]));
Bot.IRC.Command.SendCTCPMessage(channel, "ACTION", string.Format("gently makes love to {0}", nickname));
break;
case 1:
Bot.IRC.Command.SendCTCPMessage(channel, "ACTION", string.Format("sings a love ballad to {0}", command.Arguments["Nickname"]));
Bot.IRC.Command.SendCTCPMessage(channel, "ACTION", string.Format("sings a love ballad to {0}", nickname));
break;
case 2:
Bot.IRC.Command.SendCTCPMessage(channel, "ACTION", string.Format("slowly sneaks up behind {0}", command.Arguments["Nickname"]));
Bot.IRC.Command.SendCTCPMessage(channel, "ACTION", string.Format("squeezes {0} tightly", command.Arguments["Nickname"]));
Bot.IRC.Command.SendCTCPMessage(channel, "ACTION", string.Format("slowly sneaks up behind {0}", nickname));
Bot.IRC.Command.SendCTCPMessage(channel, "ACTION", string.Format("squeezes {0} tightly", nickname));
break;
case 3:
Bot.IRC.Command.SendPrivateMessage(channel, string.Format("I love you {0}! Sooo much!", command.Arguments["Nickname"]));
Bot.IRC.Command.SendPrivateMessage(channel, string.Format("I love you {0}! Sooo much!", nickname));
break;
}
break;
case "Hug":
Bot.IRC.Command.SendCTCPMessage(channel, "ACTION", string.Format("hugs {0}", command.Arguments["Nickname"]));
Bot.IRC.Command.SendCTCPMessage(channel, "ACTION", string.Format("hugs {0}", nickname));
break;
case "Slap":
Bot.IRC.Command.SendCTCPMessage(channel, "ACTION", string.Format("slaps {0} with a large trout", command.Arguments["Nickname"]));
Bot.IRC.Command.SendCTCPMessage(channel, "ACTION", string.Format("slaps {0} with a large trout", nickname));
break;
case "Brazilian Laugh":
SendResponse(command.MessageType, command.Location, command.Nick.Nickname, "HUEHUEHUE");

Loading…
İptal
Kaydet