Search code examples
c#network-programmingclient-serverprotocolsirc

Working with IRC protocol, is it possible to know if the user who sent the message is voice or op?


I am using the C# library SmartIrc4net for creating an IRC bot.

when parsing a PRIVMSG message received from the chat server in IRC (this is generic, not specific to my library choice), is there any way to know if the user is a Voice or Op?

I have access to many fields like nick, message and such but I see no way of distinguishing a normal user from a voice or op...is that feasible?

Thanks!


Solution

  • Since you are receiving a PRIVMSG, you might want to distinguish in which channel the users has to be an operator or a voiced user.

    You might want to check ChannelUser class, which contains the methods isOp and isVoice