3

I'm writing an IRC bot using twisted python, and some actions should only be available to channel operators. How do I determine the 'user level' of a user in a channel using twisteds IRCClient?

ojii
  • 4,729
  • 2
  • 23
  • 34

2 Answers2

4

One way to discover if a user has voice or op is to look at their name in a names listing. See How to use Twisted to get an IRC channel's user list for details on how to do that. Other solutions, using WHO or WHOIS, will take a similar form.

Community
  • 1
  • 1
Jean-Paul Calderone
  • 47,755
  • 6
  • 94
  • 122
0

You can also use channel access lists if your bot has permissions to do so.

Ken
  • 1,110
  • 2
  • 10
  • 26