Skip to content
Buzzen Chat Network

Wtf What Mistake Did I Make

A TG007 community discussion started by CharmedOne.

Discussion 3 posts
Page 1 of 1
Open
Topic #14181 · 3 published posts · 1,562 views

Ok this is just beyonddddddddd me i know this looks right but it isnt working, once i added the return to my code the whisper stopped closing :notworking: so now i am lost, i cant believe i am having probs with something so simple. :pizza:

 

 

#whisperclose on


raw WHISPER:*: {
  if (allow isin $+(*!*, $Ial($nick).addr))) { return
    if ($nick isop #) { return
      .closemsg $nick
    }
  }
}

#whisperclose end

unless i'm mistaken raw whisper doesn't return # for channel $1 will return the channel name

 

allow won't be in the ial addr of the nick either

 

i'm guessing you are trying to close any whispers that are not from ppl on your allow list or that are not ops in the channel.

 

if so and you are adding user level to allow by the ial addy try this

 

#whisperclose on
raw WHISPER:*: {
if (allow !isin $level($+(*!,$Ial($nick).addr))) && ($nick !isop $1) { .closemsg $nick }
}
#whisperclose end

 

Note: your user level format would be like this

Allow Whispers : auser allow *! $+ $ial($$1).addr $$1

 

Edited Mar 18, 2010 12:25 AM by err0r

Get information about ircWx here

Raw events will not return $chan as err0r states.

 

Also, you are searching for "allow" in the long gate. That will never be there.

 

I am not sure what is meant by allow, but I am assuming that allow is supposed to be a variable you set to allow gates to whisper you. I am thinking you want something more like...

 

raw Whisper:*: {
  if ( $ial($nick,1) !isin %allow && $nick !isop $1 ) { halt }
; if the gate is in allow or the nick is an op, it will continue.. otherwise it stops...
}

menu nicklist {
  Allow Whisper: { set %allow $addtok(%allow, $ial($1,1), 32) }  
}

I think this works;)

Stupidity is a metric of success.