mIRC Homepage

How can I do this?

Posted By: Dizkonnekted

How can I do this? - 06/07/04 08:56 AM

Morning all,

I'll try to explain this as best I can, I have a couple of problems displaying raw 319 info to a custom window.
The 319 info is checked against a list of 'bad' channels, if a bad channel is detected in the list the person is kicked from my channel.

The problems:
1. I'm using a rather lengthy if-then-else routing to check the channels, I'd like to be able to do this another (faster?) way, and add to the list of 'bad' channels dynamically without directly editing the script myself and adding to the long list of if-then-else.

2. I want the 'bad' channel displayed in a different color from the safe channels in the custom window, so I need a method to do this.

I'm looking for as many different solutions to this as possible, any help is greatly appreciated!

Thanks in advance!
Posted By: Kelder

Re: How can I do this? - 06/07/04 09:57 AM

make a hash table named badchans with for each bad channel an item with as name the channelname and as data the number 1
raw 319:*: {
  var %i = 1
  var %chanlist, %chan
  .!echo -q $regsub($gettok($3-,%i,32),^[^#&]*+,,%chan)
  while (%chan) {
    if ($hget(badchans,%chan)) {
      echo $color(whois)  -s bad chan detected: %chan
      var %chanlist = %chanlist $+(4,%chan,)
    else {
      var %chanlist = %chanlist %chan
    inc %i
    .!echo -q $regsub($gettok($3-,%i,32),^[^#&]*+,,%chan)
  echo $color(whois) -s $2 on %chanlist

(now it's tested smile )
© 2020 mIRC Discussion Forums