Browse Source

Made for loop to foreach.

tags/3.0.4
Teknikode 4 years ago
parent
commit
9f350982c4
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      Modules/Owner Control/Owner_Control.cs

+ 2
- 2
Modules/Owner Control/Owner_Control.cs View File

@@ -32,9 +32,9 @@ namespace Combot.Modules.Plugins
{
SendResponse(command.MessageType, command.Location, command.Nick.Nickname, "You are already identified as an owner.");
}
for (int i = 0; i < Bot.IRC.Channels.Count; i++)
foreach (Channel chan in Bot.IRC.Channels)
{
Nick foundNick = Bot.IRC.Channels[i].Nicks.Find(nick => nick.Nickname == command.Nick.Nickname);
Nick foundNick = chan.Nicks.Find(nick => nick.Nickname == command.Nick.Nickname);
if (foundNick != null)
{
foundNick.AddMode(UserMode.r);

Loading…
Cancel
Save