This looks like a fine module for those interested in such features, however I think some of the code can be cleaned up.
Currently, n00bie, you check for each ircd that has +q/a and sets +ao and +o on all other ircds.
I think it might be easier and more dynamic to check for ircd->admin and if it returns 1 then set ircd->adminset
for example:
if (ircd->admin == 1) {
anope_cmd_mode(s_ChanServ, av[0], "+%so %s %s", ircd->adminset, s_ChanServ, s_ChanServ);
} else{
anope_cmd_mode(s_ChanServ, av[0], "+o %s", s_ChanServ);
}
This will also allow for additions of owner/admin supported IRCds as well as which character they use for admin without changing your source code at all.
If coded correctly it would replace all of this:
if (!stricmp(IRCDModule, "inspircd") ||
!stricmp(IRCDModule, "plexus") ||
!stricmp(IRCDModule, "ptlink") ||
!stricmp(IRCDModule, "inspircd") ||
!stricmp(IRCDModule, "ultimate2") ||
!stricmp(IRCDModule, "unreal32") ||
!stricmp(IRCDModule, "viagra")) {
anope_cmd_mode(s_ChanServ, av[0], "+ao %s %s", s_ChanServ, s_ChanServ);
} else {
anope_cmd_mode(s_ChanServ, av[0], "+o %s", s_ChanServ);
}
I also think you should allow Services Admins to use this command as well.
[Edited on 31-8-2007 by katsklaw]