From 8ed63fe681c5dbd1f3993b8b8e3ef7a7e9ef0fc8 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 19 Sep 2006 18:24:07 +0000 Subject: Make the check against z/k/q/e/g methods return a pointer to the whole object rather than just the reason string git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5305 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index 8c6711d64..46d841de5 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -973,14 +973,14 @@ void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached, userrec::QuitUser(Instance, _new,"Server is full"); return; } - char* e = Instance->XLines->matches_exception(_new); + ELine* e = Instance->XLines->matches_exception(_new); if (!e) { - char* r = Instance->XLines->matches_zline(ipaddr); + ZLine* r = Instance->XLines->matches_zline(ipaddr); if (r) { char reason[MAXBUF]; - snprintf(reason,MAXBUF,"Z-Lined: %s",r); + snprintf(reason,MAXBUF,"Z-Lined: %s",r->reason); userrec::QuitUser(Instance, _new,reason); return; } @@ -1068,26 +1068,26 @@ void userrec::FullConnect(CullList* Goners) return; } - char* e = ServerInstance->XLines->matches_exception(this); + ELine* e = ServerInstance->XLines->matches_exception(this); if (!e) { - char* r = ServerInstance->XLines->matches_gline(this); + GLine* r = ServerInstance->XLines->matches_gline(this); if (r) { char reason[MAXBUF]; - snprintf(reason,MAXBUF,"G-Lined: %s",r); + snprintf(reason,MAXBUF,"G-Lined: %s",r->reason); Goners->AddItem(this, reason); return; } - r = ServerInstance->XLines->matches_kline(this); + KLine* n = ServerInstance->XLines->matches_kline(this); - if (r) + if (n) { char reason[MAXBUF]; - snprintf(reason,MAXBUF,"K-Lined: %s",r); + snprintf(reason,MAXBUF,"K-Lined: %s",n->reason); Goners->AddItem(this, reason); return; } -- cgit v1.3.1-10-gc9f91