diff options
| author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-12-16 02:25:38 +0000 |
|---|---|---|
| committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-12-16 02:25:38 +0000 |
| commit | c6e3324b302aa9ef4cf6bdf002719d8bf2908a0b (patch) | |
| tree | aabd05d10c6252151fb452b0db428dd985d5a884 /src/operserv.c | |
| parent | 98aa38d800a85e4cd295f435424524bbf2f0a3b1 (diff) | |
Made many of the functions in IRCDProto accept the relative object pointers instea of char* everywhere, and updated TODO
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2706 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/operserv.c')
| -rw-r--r-- | src/operserv.c | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/src/operserv.c b/src/operserv.c index 733e69982..d2711aaec 100644 --- a/src/operserv.c +++ b/src/operserv.c @@ -311,8 +311,7 @@ int add_akill(User * u, const char *mask, const char *by, const time_t expires, slist_add(&akills, entry); if (Config.AkillOnAdd) - ircdproto->SendAkill(entry->user, entry->host, entry->by, entry->seton, - entry->expires, entry->reason); + ircdproto->SendAkill(entry); delete [] mask2; @@ -336,16 +335,14 @@ int check_akill(const char *nick, const char *username, const char *host, continue; if (Anope::Match(username, ak->user, false) && Anope::Match(host, ak->host, false)) { - ircdproto->SendAkill(ak->user, ak->host, ak->by, ak->seton, - ak->expires, ak->reason); + ircdproto->SendAkill(ak); return 1; } if (ircd->vhost) { if (vhost) { if (Anope::Match(username, ak->user, false) && Anope::Match(vhost, ak->host, false)) { - ircdproto->SendAkill(ak->user, ak->host, ak->by, ak->seton, - ak->expires, ak->reason); + ircdproto->SendAkill(ak); return 1; } } @@ -354,8 +351,7 @@ int check_akill(const char *nick, const char *username, const char *host, if (ip) { if (Anope::Match(username, ak->user, false) && Anope::Match(ip, ak->host, false)) { - ircdproto->SendAkill(ak->user, ak->host, ak->by, ak->seton, - ak->expires, ak->reason); + ircdproto->SendAkill(ak); return 1; } } @@ -381,7 +377,7 @@ void expire_akills() continue; if (Config.WallAkillExpire) - ircdproto->SendGlobops(Config.s_OperServ, "AKILL on %s@%s has expired", + ircdproto->SendGlobops(findbot(Config.s_OperServ), "AKILL on %s@%s has expired", ak->user, ak->host); slist_delete(&akills, i); } @@ -392,7 +388,7 @@ static void free_akill_entry(SList * slist, void *item) Akill *ak = static_cast<Akill *>(item); /* Remove the AKILLs from all the servers */ - ircdproto->SendAkillDel(ak->user, ak->host); + ircdproto->SendAkillDel(ak); /* Free the structure */ delete [] ak->user; @@ -510,7 +506,7 @@ int add_sgline(User * u, const char *mask, const char *by, time_t expires, slist_add(&sglines, entry); - ircdproto->SendSGLine(entry->mask, entry->reason); + ircdproto->SendSGLine(entry); if (Config.KillonSGline && !ircd->sglineenforce) { snprintf(buf, (BUFSIZE - 1), "G-Lined: %s", entry->reason); @@ -544,9 +540,9 @@ int check_sgline(const char *nick, const char *realname) continue; if (Anope::Match(realname, sx->mask, false)) { - ircdproto->SendSGLine(sx->mask, sx->reason); + ircdproto->SendSGLine(sx); /* We kill nick since s_sgline can't */ - ircdproto->SendSVSKill(Config.ServerName, nick, "G-Lined: %s", sx->reason); + ircdproto->SendSVSKill(NULL, finduser(nick), "G-Lined: %s", sx->reason); return 1; } } @@ -569,7 +565,7 @@ void expire_sglines() continue; if (Config.WallSGLineExpire) - ircdproto->SendGlobops(Config.s_OperServ, "SGLINE on \2%s\2 has expired", + ircdproto->SendGlobops(findbot(Config.s_OperServ), "SGLINE on \2%s\2 has expired", sx->mask); slist_delete(&sglines, i); } @@ -580,7 +576,7 @@ static void free_sgline_entry(SList * slist, void *item) SXLine *sx = static_cast<SXLine *>(item); /* Remove the SGLINE from all the servers */ - ircdproto->SendSGLineDel(sx->mask); + ircdproto->SendSGLineDel(sx); /* Free the structure */ delete [] sx->mask; @@ -789,7 +785,7 @@ void expire_sqlines() continue; if (Config.WallSQLineExpire) - ircdproto->SendGlobops(Config.s_OperServ, "SQLINE on \2%s\2 has expired", + ircdproto->SendGlobops(findbot(Config.s_OperServ), "SQLINE on \2%s\2 has expired", sx->mask); slist_delete(&sqlines, i); @@ -908,7 +904,7 @@ int add_szline(User * u, const char *mask, const char *by, time_t expires, entry->expires = expires; slist_add(&szlines, entry); - ircdproto->SendSZLine(entry->mask, entry->reason, entry->by); + ircdproto->SendSZLine(entry); return deleted; } @@ -934,7 +930,7 @@ int check_szline(const char *nick, char *ip) } if (Anope::Match(ip, sx->mask, false)) { - ircdproto->SendSZLine(sx->mask, sx->reason, sx->by); + ircdproto->SendSZLine(sx); return 1; } } @@ -958,7 +954,7 @@ void expire_szlines() continue; if (Config.WallSZLineExpire) - ircdproto->SendGlobops(Config.s_OperServ, "SZLINE on \2%s\2 has expired", + ircdproto->SendGlobops(findbot(Config.s_OperServ), "SZLINE on \2%s\2 has expired", sx->mask); slist_delete(&szlines, i); } @@ -969,7 +965,7 @@ static void free_szline_entry(SList * slist, void *item) SXLine *sx = static_cast<SXLine *>(item); /* Remove the SZLINE from all the servers */ - ircdproto->SendSZLineDel(sx->mask); + ircdproto->SendSZLineDel(sx); /* Free the structure */ delete [] sx->mask; |
