Originally Posted By: Jeroi
to do some kind of OP checking system that checks if pm sender is OP in same channel than I am thus automatically grants pm access to Operators.
There is no $chan in the PM, so we need to loop through the common channels to check if that person who sends you a PM is an OP or not. What I have done here is that non-ops who send you a PM will be closed:
Code:
on *:open:?:*:{
  var %pm $comchan($nick,0)
  while (%pm) {
    if ($nick !isop $comchan($nick,%pm)) { close -m $nick }
    else {
      if ($hget(pmusers) != $null) {
        if ($nick != $hget(pmusers, $nick)) {
          .notice $me $nick just tried to sen PM with stareting word: $1
          .notice $nick Sorry, unknown PM messages are not allowed and not received. Please ask privlidges in main chat.
          return
        }
        else { msg $nick Hello, I got your message and will try to respond to you ASAP. }
      }
    }
    dec %pm
  }
}

Last edited by Tomao; 17/04/11 06:44 PM.