can_do
can_do($chan, $perm, $acc, $user)
Consider changing.
- %chan
- hash with two keys
- AGENT - whether bot or $csnick
- CHAN - well, the name of the channel.
- hash with two keys
- $perm is a string. passed into the db in the chanperm and chanlvl tables
- $acc is the rsult of get_best_acc(%chan, %user), if known. can be undef()
- %user is optional, but only if $acc is defined.
- is a hash containing NICK, ID, and AGENT.
- These must be accessed using get_user_nick, get_user_id, and get_user_agent. don't access the hash directly, as they may be undefined!
get_best_acc
get_best_acc($chan, $user)
Returns the best channel access level available to a user.