Top

Channel list + total


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  3.0 (of 1 scores)
Date Added  Jul 16, 2008
Last Updated  Jul 16, 2008
Tags  channel  channels  list  total 

Introduction

Introductions: Change out #YourChannel with Your main/bot channel.

Commands:
; !chans shows you all chans your bot is on and total how many.

Grab the Code

on *:text:!chans:#YourChannel: {
  if ($nick isop $chan) {
    var %x = 1
    set %y
    while (%x <= $calc($chan(0) + 1)) {
      if (%x == $calc($chan(0) + 1)) {
        .notice $nick Channels: %y $chr(91) $+ Total: $chan(0) $+ $chr(93)
        unset %y      
        break
      }
      else {   
        set %y $addtok(%y,$chan(%x),32)
        inc %x
      }
    }
  }
  else {
    .notice $nick ERROR! You are not authorized to use this command. 
  }
}

Comments

  (4)  RSS
mountaindew
Comments: 1,826
 
mIRC Snippet:  Channel list + total
Posted on Jul 16, 2008 1:20 pm
Instead of doing the number of channels + 1 thing, you can just notice after the while, like this:
Code:

while $chan(%x) {
  var %y = %y $v1
  inc %x
}
.notice $nick I'm on these channels: %y Total: $chan(0)

Jamiie
Comments: 167
 
mIRC Snippet:  Channel list + total
Posted on Jul 17, 2008 2:14 am
Instead of if ($nick ison $chan) just put a @.

Code:

on @text:!chans:#yourchannel: {
mountaindew
Comments: 1,826
 
mIRC Snippet:  Channel list + total
Posted on Jul 17, 2008 8:57 am
Jamiie, I think you meant to say change "isop" but anyway, on @ checks if $me isop, not $nick.
Yilena
Comments: 13
 
mIRC Snippet:  Channel list + total
Posted on Jul 17, 2008 11:19 am
I have the same sorta script in my own bot.. but with whois raw..

Code:

on *:TEXT:!Where:#: {
  raw whois $me
  set %chan $chan
}
raw 319:*: {
  msg %chan Channels im in: $Remove($3-,~,&,@,%,+)  Thats a total of $chan(0) channels.
  halt
}

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom