added $.x.y fakhosts where $ gets replaced with the users auth handle
[srvx.git] / src / chanserv.c
index 0b1eb400924602de690951a828110365a6ae77df..e160f620231427109ad6aa7c147de10a2ede7395 100644 (file)
@@ -3264,6 +3264,20 @@ eject_user(struct userNode *user, struct chanNode *channel, unsigned int argc, c
 
     offset = (action & ACTION_ADD_TIMED_BAN) ? 3 : 2;
     REQUIRE_PARAMS(offset);
+    if(argc > offset && IsNetServ(user))
+    {
+        if(*argv[offset] == '$') {
+            struct userNode *hib;
+            const char *accountnameb = argv[offset] + 1;
+            if(!(hib = GetUserH(accountnameb)))
+            {
+                reply("MSG_HANDLE_UNKNOWN", accountnameb);
+                return 0;
+            }
+            user=hib;
+            offset++;
+        }
+    }
     if(argc > offset)
     {
         reason = unsplit_string(argv + offset, argc - offset, NULL);