!info Channel info for your Bot

By FordLawnmower on Mar 24, 2009

This snippet will add a !info trigger to your bot. The script gets the information from the server, with a quick call to /list. Because this only searches /list for an exact match, it uses very little resources.
To use: Paste into remotes of the bot, save and then type !info channelname | !info #channelname
From another client.
This will return the number of users and the topic from any channel that shows up on /list.

;!info Channel info by Ford_Lawnmower irc.abjects.net #mIRC
Menu Channel,Status {
  -
  .$iif($group(#info.Trigger) == On,$style(1)) !list Channel Info 
  ..$iif($group(#info.Trigger) == On,$style(2)) Trigger On: .enable #info.Trigger
  ..$iif($group(#info.Trigger) == Off,$style(2)) Trigger Off: .disable #info.Trigger
}
#list.info on
raw 321:*:{ haltdef }
raw 322:*:{
  haltdef
  set -u6 %list.result $2
  .msg %InfoChan 06Information 09for07 $2 
  tokenize 32 $3 $iif($left($4,1) != $chr(91),N/A) $4-
  .msg %InfoChan 06Users 09=07 $1 06Modes 09=07 $2 
  .msg %InfoChan 06Topic 09= $3-
}
raw 323:*:{
  haltdef
  Window -c $qt(Channels List)
  if (!%list.result) { .msg %InfoChan No Such Channel %ChanName }
  unset %InfoChan %list.result
  .disable #list.info
}
#list.info end
#info.trigger on
on $*:Text:/^!info\s(.*)/Si:#:{
  if (!$timer($+(listinfo,$network,$chan))) {
    $+(.timerlistinfo,$network,$chan) 1 4 noop
    var %listchan $regml(1)
    if (%listchan) {
      .enable #list.info
      set -u6 %InfoChan $chan
      list $iif($left(%listchan,1) == $chr(35),%listchan,$+($chr(35),%listchan))
      else .msg $chan Syntax is !info channelname
    }
  }
}
#info.trigger End

Comments

Sign in to comment.
Stewie1k94   -  May 01, 2011

hmm its a good script it works well 10/10 from me

 Respond  
GTAXL   -  Mar 22, 2010

haha. I figured it out. Took hours. I got the main stuff. Now just need it to not be on one message.

 Respond  
FordLawnmower   -  Mar 22, 2010

I'm not remaking all of my scripts for you GTAXL. You will have to learn to code this yourself thx.

 Respond  
GTAXL   -  Mar 22, 2010

@FordLawnmower
Looks ok. Worked but I don't like the colors. -.- Sorry. It's just I like everything touched up. Anyway to make it show
Information For This Channel
There are 11 users in this channel. 6 Of them are ops.
The topic is: (topic here)
There are a total of 18 kicks in this channel.
There are a total of 12 bans in this channel.

(The numbers are just for example. But that's what I want it to show. And no colors. thx.)

 Respond  
FordLawnmower   -  Feb 26, 2010

@MagicRevealer09 !list is a command sometimes used by xdcc servers. The server is just blocking any line that starts with !list to prevent people from running file sharing servers on the network.
The trigger was changed to !info #channelname for this reason.
Try !info #MagicRevealer09
;/ I don't even remember posting this.

 Respond  
MagicRevealer09   -  Feb 26, 2010

wtf? I got this: > !list #MagicRevealer09

  • magicrevealer09 :Message blocked: No file sharing

    !list magicrevealer09
  • magicrevealer09 :Message blocked: No file sharing

    !list thebots
  • magicrevealer09 :Message blocked: No file sharing

    help?

 Respond  
lg84   -  Sep 12, 2009

/me likes it thanks

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.