]> jfr.im git - solanum.git/blobdiff - ircd/monitor.c
whowas.c: store account name in whowas (#323)
[solanum.git] / ircd / monitor.c
index bab371ed16242369aa637041d62b926a90321d4d..31b44a43fb17cb9f34d1db5635e01fe6077be7c4 100644 (file)
@@ -28,8 +28,6 @@
  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id: monitor.c 3520 2007-06-30 22:15:35Z jilles $
  */
 #include "stdinc.h"
 #include "client.h"
 #include "hash.h"
 #include "numeric.h"
 #include "send.h"
-#include "irc_radixtree.h"
+#include "rb_radixtree.h"
 
-static struct irc_radixtree *monitor_tree;
+static rb_radixtree *monitor_tree;
 
 void
 init_monitor(void)
 {
-       monitor_tree = irc_radixtree_create("monitor lists", irc_radixtree_irccasecanon);
+       monitor_tree = rb_radixtree_create("monitor lists", irccasecanon);
 }
 
 struct monitor *
@@ -52,7 +50,7 @@ find_monitor(const char *name, int add)
 {
        struct monitor *monptr;
 
-       monptr = irc_radixtree_retrieve(monitor_tree, name);
+       monptr = rb_radixtree_retrieve(monitor_tree, name);
        if (monptr != NULL)
                return monptr;
 
@@ -60,7 +58,7 @@ find_monitor(const char *name, int add)
        {
                monptr = rb_malloc(sizeof(*monptr));
                rb_strlcpy(monptr->name, name, sizeof(monptr->name));
-               irc_radixtree_add(monitor_tree, monptr->name, monptr);
+               rb_radixtree_add(monitor_tree, monptr->name, monptr);
 
                return monptr;
        }
@@ -74,7 +72,7 @@ free_monitor(struct monitor *monptr)
        if (rb_dlink_list_length(&monptr->users) > 0)
                return;
 
-       irc_radixtree_delete(monitor_tree, monptr->name);
+       rb_radixtree_delete(monitor_tree, monptr->name);
        rb_free(monptr);
 }
 
@@ -97,7 +95,7 @@ monitor_signon(struct Client *client_p)
 
        snprintf(buf, sizeof(buf), "%s!%s@%s", client_p->name, client_p->username, client_p->host);
 
-       sendto_monitor(monptr, form_str(RPL_MONONLINE), me.name, "*", buf);
+       sendto_monitor(client_p, monptr, form_str(RPL_MONONLINE), me.name, "*", buf);
 }
 
 /* monitor_signoff()
@@ -116,7 +114,7 @@ monitor_signoff(struct Client *client_p)
        if(monptr == NULL)
                return;
 
-       sendto_monitor(monptr, form_str(RPL_MONOFFLINE), me.name, "*",
+       sendto_monitor(client_p, monptr, form_str(RPL_MONOFFLINE), me.name, "*",
                        client_p->name);
 }