- glinebufcounthits(&gbuf, &users, &channels);
-
- if (channels > MAXUSERGLINECHANNELHITS) {
- glinebufabandon(&gbuf);
- controlreply(sender, "G-Line on '%s' would hit %d channels. Limit is %d. Not setting G-Line.", mask, channels, MAXUSERGLINECHANNELHITS);
- return CMD_ERROR;
- } else if (users > MAXUSERGLINEUSERHITS) {
- glinebufabandon(&gbuf);
- controlreply(sender, "G-Line on '%s' would hit %d users. Limit is %d. Not setting G-Line.", mask, users, MAXUSERGLINEUSERHITS);
- return CMD_ERROR;
+ if (operlimit) {
+ glinebufcounthits(&gbuf, &users, &channels);
+
+ if (channels > MAXUSERGLINECHANNELHITS) {
+ glinebufabandon(&gbuf);
+ controlreply(sender, "G-Line on '%s' would hit %d channels. Limit is %d. Not setting G-Line.", mask, channels, MAXUSERGLINECHANNELHITS);
+ return CMD_ERROR;
+ } else if (users > MAXUSERGLINEUSERHITS) {
+ glinebufabandon(&gbuf);
+ controlreply(sender, "G-Line on '%s' would hit %d users. Limit is %d. Not setting G-Line.", mask, users, MAXUSERGLINEUSERHITS);
+ return CMD_ERROR;
+ }