Re: brenbot plugin needed [message #418941 is a reply to message #418939] |
Sun, 31 January 2010 07:20 |
|
reborn
Messages: 3231 Registered: September 2004 Location: uk - london
Karma:
|
General (3 Stars) |
|
|
Hex wrote on Sun, 31 January 2010 08:44 | All in all, the whole way you're doing it is bad
Brenbots auth system is not only for mods anyone can use it as long as they have registered their name with the bot so even basing it on the auth command is a bad move, ot even going in to the bugs that the bot had/has with its player leaving/joining/failing to dtm temp mods ect
|
What I mean is only when a moderator !auth themselves, obviously not just any player. I should of made that clear though.
Whether the bot has or had bugs with noticing players leaving or joining is irrelevant. When an "authed" player leaves the server, the player leave hook catched this and removes them from the vector:
DLLEXPORT void SSGM_Player_Leave_Hook(int ID) {
if (AuthCheck(ID) == true) {
AuthClearPlayer(ID);
}
}
void AuthClearPlayer(int ID) {
for (unsigned int i = 0; i < AuthedPlayers.size(); i++) {
if (AuthedPlayers[i].AuthedPlayerName == Get_Player_Name_By_ID(ID)) {
AuthedPlayers.erase(AuthedPlayers.begin() + i);
}
}
}
I disagree that it's a bad way of doing it really, it would allow for more moderator in-game chat commands to made and used safely.
If nothing else, at least it's another option out there.
|
|
|