Top

Broadcast


mIRC Code
+ 0 likes
Please Register to submit score.
Average Score  2.3
Scores Submitted  3
Date Added  Jun 24, 2008
Last Updated  Jun 24, 2008
Tags  amsg  broad  broadcast  sende 
  Bookmark and Share

Introduction

This a broadcast script for bots, it's like an amsg but broadcast means to send out information by a bot.

Command:
$broadcast [message]

The command is only for operators, but you can fix that if not /q me

Grab the Code

Comments

  (11)  RSS
mountaindew
Comments: 1,550
 
mIRC Snippet:  Broadcast
Posted on Jun 24, 2008 4:57 pm
Code:

    Var %z = #chan #chan #chan

I would say in the description that people need to put exception channels in there.
Code:

      If ($Chan(%x) !isin %z) {

I would use !$istok rather than !isin, because a restricted channel could be #test123 and #test would match. If you don\'t know what $istok does, it\'ll check if $chan(%x) matches one of the tokens in the %z variable (each channel in this case).
Typo
Comments: 186
 
mIRC Snippet:  Broadcast
Posted on Jun 24, 2008 5:02 pm
What would you think about maybe killing the %z = line and add on on load and menu option that uses a goto loop to add channels to the %z variable

for instance

Code:
on *:load:{ setchannels }
alias setchannels {
  if ($input(Would you like to add a channel?,y,Add a channel) == $true) {
    :addanother
    var %tmptmp = #$$?=\"Enter the channel name to be added.\"
    if (%tmptmp != $null) && ($istok(%z,%tmptmp,32) != $true) {
      %z = $addtok(%z,%tmptmp,32)
    }
    if ($input(Would you like to add another channel?,y,Add a channel) == $true) { goto addanother }
  }
}


This seems sloppy to me but i tried a while ($input() != $true) line and it wouldnt work for me.

Honestly tho Im just trying to convey my idea, not make the best code I can.

Anyhoo then you could maybe even add a..

Code:
menu channel,query,status,nicklist { Set $chr(36) $+ Broadcast Channels:setchannels }


It did occur to me that you might also want to include a removechannels alias but making that from the example above would be pretty easy and im only trying to convey an idea here.
xelent
Comments: 6
 
mIRC Snippet:  Broadcast
Posted on Jun 25, 2008 7:09 am
This script works 100% stop complain :P
Typo
Comments: 186
 
mIRC Snippet:  Broadcast
Posted on Jun 25, 2008 7:16 am
Woah man. Nobody complained once.

One of the main purposes of this snippet repository is for scriptors to get feedback on the code they share.

If you are not open to comments like those above than you should probably rethink posting here because you will always get them.

Nobody said it didnt work, we merely suggested ways of improving it.

EL
Comments: 1,242
 
mIRC Snippet:  Broadcast
Posted on Jun 25, 2008 7:22 am
ROFL rite guna learn that fast round these parts:P
mountaindew
Comments: 1,550
 
mIRC Snippet:  Broadcast
Posted on Jun 25, 2008 10:18 am
Code:

This script works 100% stop complain :P

Well it does work, but not 100%. Like I said before, you could have the channel #test123 in the %z variable but be in the channel #test, and it won\'t do the broadcast.
jonesy44
Comments: 936
 
mIRC Snippet:  Broadcast
Posted on Jun 25, 2008 5:31 pm
Code:
if (!$regex(%z,\\\\$$chan(%x)^)) {


May wanna check tht, but i think it should work lol
Bouncer
Comments: 120
 
mIRC Snippet:  Broadcast
Posted on Jun 26, 2008 10:49 am
[QUOTE=xelent]This script works 100% stop complain :P[/QUOTE]

Lol, I wouldn\'t complain about the feedback you get. Alot of my posts on my old account never even got commented. Even some on this account haven\'t been. :)
Bouncer
Comments: 120
 
mIRC Snippet:  Broadcast
Posted on Jun 26, 2008 10:49 am
Sorry for the double post, but they should make
Quote:
work in comments -_-

I had forgotten it didn\'t, lol.
Bouncer
Comments: 120
 
mIRC Snippet:  Broadcast
Posted on Jun 26, 2008 10:50 am
Ok, so it does work, just not a targeted quote? OR maybe I keyed it in wrong, too tired to double check myself.
mountaindew
Comments: 1,550
 
mIRC Snippet:  Broadcast
Posted on Jun 26, 2008 11:00 am
Yea, you can only do [ quote ], not a specific name. By the way, you can edit comments now, so you can fix your original quote to work :)

Quote:

Code:
if (!$regex(%z,\\$$chan(%x)^)) {


May wanna check tht, but i think it should work lol

You mixed it up, ^ starts it and $ ends it, and you escaped the wrong $

Please Register or Login to start posting comments.
Bottom