Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if (m.ReceiveType == MessageReceiveType.Mode)
- {
- //+v-o+o Nick1 Nick2 Nick3
- string[] modepara = m.Message.Split(' '); //die parameter der mode nachricht.
- bool gives = modepara[0][0] == '+'; //boolean der bestimmt ob der modus gegeben oder genommen wird.
- string ret = "";
- for (int i = 1, k = 1; i < modepara.Length; i++, k++) //
- {
- switch (modepara[0][k])
- {
- case '+':
- gives = true; k++; break;
- case '-':
- gives = false; k++; break;
- case 'v':
- if (gives) ret += TimePrefix + "\x000310* " + m.Nick + "\x0003 gives voice to \x00032" + modepara[i] + "\x0003\r\n";
- else ret += TimePrefix + "\x000310* " + m.Nick + "\x0003 removes voice from \x00032" + modepara[i] + "\x0003\r\n";
- break;
- case 'h':
- if (gives) ret += TimePrefix + "\x000310* " + m.Nick + "\x0003 gives channel half-operator status to \x00032" + modepara[i] + "\x0003\r\n";
- else ret += TimePrefix + "\x000310* " + m.Nick + "\x0003 removes channel half-operator status from \x00032" + modepara[i] + "\x0003\r\n";
- break;
- case 'o':
- if (gives) ret += TimePrefix + "\x000310* " + m.Nick + "\x0003 gives channel operator status to \x00032" + modepara[i] + "\x0003\r\n";
- else ret += TimePrefix + "\x000310* " + m.Nick + "\x0003 removes channel operator status from \x00032" + modepara[i] + "\x0003\r\n";
- break;
- case 'a':
- case 'q':
- if (gives) ret = TimePrefix + "\x000310* " + m.Nick + "\x0003 sets mode \x00038+" + modepara[0][k] + "\x0003 on \x00036" + m.Channel + " " + modepara[i] + "\x0003\r\n";
- else ret = TimePrefix + "\x000310* " + m.Nick + "\x0003 sets mode \x00038-" + modepara[0][k] + "\x0003 on \x00036" + m.Channel + " " + modepara[i] + "\x0003\r\n";
- break;
- }
- }
- ret = ret.TrimEnd('\r', '\n');
- string[] stuff = ret.Split("\r\n".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
- foreach (string s in stuff)
- Logs[m.Channel].Enqueue(s);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement