Cannot make a bot the channel operator on an IRC server based on InspIRCd

110 views Asked by At

I am working on a pet project where I have an IRC server based on InspIRCd. I have a few bots from some external scripts, which keep connecting to a channel under this server and quitting after posting some updates. Let us name the "broadcast-channel".

Each bot when connecting to the channel from a script, has a nick followed by a 3 digit random number, just to prevent the same nick issue, that is being rejected by the IRC server due to nick duplication.

At times, I see the bots fail to quit and stay put in the channel, while a different bot continues to join from the script and join the channel. I have tried forcefully quitting the bot using some timers, but the bots still fail to quit sometimes, perhaps it gets stuck somewhere.

To solve this issue, I intend to have an admin bot which would "kick" the non-performing bots out of the channel. I am trying my steps using Weechat as well as WinIRC as clients to this server on inspIRCd.

The settings on inspircd.conf looks like this.

<bind... and other settings>

<class name="SACommands" commands="SAJOIN SAPART SANICK SAQUIT SATOPIC SAKICK SAMODE OJOIN" usermodes="o">
<class name="ServerLink" commands="CONNECT SQUIT RCONNECT RSQUIT MKPASSWD ALLTIME SWHOIS LOCKSERV UNLOCKSERV" usermodes="*" chanmodes="*" privs="servers/auspex" snomasks="Cc">
<class name="BanControl" commands="KILL GLINE KLINE ZLINE QLINE ELINE TLINE RLINE CHECK NICKLOCK NICKUNLOCK SHUN CLONES CBAN" usermodes="*" chanmodes="*" snomasks="Xx">
<class name="OperChat" commands="WALLOPS GLOBOPS" usermodes="*" chanmodes="*" privs="users/mass-message" snomasks="Gg">
<class name="HostCloak" commands="SETHOST SETIDENT SETIDLE CHGNAME CHGHOST CHGIDENT" usermodes="*" chanmodes="*" privs="users/auspex">

<type name="GlobalOp" classes="SACommands OperChat BanControl HostCloak ServerLink" vhost="[email protected]">
<type name="Helper" classes="HostCloak" vhost="[email protected]">


<oper
      name="Kicker"
      password="kickerpassword"
      host="*"
      type="GlobalOp">

From weechat, I am able to put this password and become an operator using the oper command. I see my nick followed by a (o) .. like abir(o).

However, when I go to kick another bot out of the "#broadcast-channel", I get an error stating "you must be a channel operator" or "you must be a channel half-operator". I have also received "You must have channel op access or above to set channel mode to o", when I tried changing the channel mode.

I have tried to read through the documentation and tried multiple ways to solve this, but due to my lack of knowledge in IRC, I am unable to kick a bot out.

Any help on this would highly appreciated.

(FYI, My scripts are small nodejs scripts using irc-framework modules to connect to the IRC channel. I am using the 6667 port, so it is unsecured right now, however, I doubt if it makes a difference to secure it via the 6697 port to connect to the server. I can provide more context and info if one needs. Eventually, I will have another script kicking the non-performing bots at intervals)

0

There are 0 answers