IRC Bot problems on UnrealIRCd

If you have trouble on your server with spam, drones/zombies/bots or proxies

Moderator: Supporters

Post Reply
balasahu
Posts: 1
Joined: Sun May 02, 2021 6:51 am
Contact:

IRC Bot problems on UnrealIRCd

Post by balasahu »

I have been working on bot in C# (using Amrykid.Web.IRC library - i know it's buggy but this is not related to it - i suppose) And i ran into small problem today.

When I try to join localhost IRC (unrealircd 4) it gives me this in log (user joins server but doesn't join channel).

Code: Select all

:cisco.1337 NOTICE * :*** Looking up your hostname...
:cisco.1337 NOTICE * :*** Found your hostname
PING :9574792D
PONG :9574792D
:cisco.1337 451 MODE :You have not registered
:cisco.1337 451 JOIN :You have not registered
:cisco.1337 001 NoNameService :Welcome to the Cisco Localhost IRC Network NoNameService!NoNameServ@localhost
And when I try to join 'irc.freenode.net' it all goes through and user joins channel

Code: Select all

:weber.freenode.net NOTICE * :*** Looking up your hostname...
:weber.freenode.net NOTICE * :*** Checking Ident
:weber.freenode.net NOTICE * :*** Found your hostname
:weber.freenode.net NOTICE * :*** Got Ident response
:weber.freenode.net 001 NoNameService :Welcome to the freenode Internet Relay Chat Network NoNameService
Here is my code I am using (just changing IRCServer string)

Code: Select all

#region Server Variables
        static string IRCServer = "irc.freenode.net";
        static int IRCPort = 6667;
        static string IRCChan = "#ciscobot";
        static string _password = "adminPassword";
        static string trigger = ".";
        #endregion

        static string nick = "NoNameService";
        static IRC _irc;
        static List<string> users = new List<string>();
        static void Main(string[] args)
        {
            _irc = new IRC(nick);
            _irc.Nick = nick;
            _irc.Connect(IRCServer, IRCPort);
            _irc.Logon(nick, nick);
            _irc.Join(IRCChan);
            _irc.IRCUserJoin += new IRC.IRCUserJoinHandler(_irc_IRCUserJoinHandler);
            _irc.IRCUserQuit += new IRC.IRCUserQuitHandler(_irc_IRCUserQuitHandler);
            _irc.IRCUserKick += new IRC.IRCUserKickHandler(_irc_IRCUserKickHandler);
            _irc.IRCPrivateMSGRecieved += new IRC.IRCPrivateMSGRecievedHandler(_irc_IRCPrivateMSGRecieved);
            while (true)
            {
                _irc.ProcessEvents(0);
            }
        }
I've been searching all day but i can't seem to find what is wrong...
Syzop
UnrealIRCd head coder
Posts: 1974
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Re: IRC Bot problems on UnrealIRCd

Post by Syzop »

You have to wait before you receive the 001 and then you can start sending MODE, JOIN, etc :)

(Right now you end up sending them in the registration phase due to the extra PING-PONG check from UnrealIRCd. In the registration phase only a very limited set of commands are allowed like NICK USER PASS CAP PONG)
Lord255
Posts: 67
Joined: Sat Feb 29, 2020 12:58 am
Location: offline

Re: IRC Bot problems on UnrealIRCd

Post by Lord255 »

:idea: not related to the question, but unreal4 reached end of life already, soooo, would be a good idea to upgrade to unreal5 :) :idea:
Post Reply