mIRC Home    About    Download    Register    News    Help

Print Thread
#184997 03/09/07 05:45 PM
Joined: Aug 2007
Posts: 41
P
Panic Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Aug 2007
Posts: 41
Hello all. I am just asking scripters here can you make a a script that if Panic or trollman118 says !request <message> it will amsg all the servers it is on normally more than one and say the message that was put in the <massage> tag

Thanks
Panic
ctcwcu head


CrazyMan IRC Bot Admin
IRC UnGoWa Support
NeoBlab Server-Admin
Chat Operator
Panic #185002 03/09/07 06:37 PM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
You should start with trying to create something yourself.
You've seen many examples by now.

OrionsBelt #185007 03/09/07 06:47 PM
Joined: Aug 2007
Posts: 41
P
Panic Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Aug 2007
Posts: 41
I have tryed with this one but is i have to go around all the servers and type it i wanted it so i type it once and it does amsg for all servers

Thanks
Panic


CrazyMan IRC Bot Admin
IRC UnGoWa Support
NeoBlab Server-Admin
Chat Operator
Panic #185009 03/09/07 07:25 PM
Joined: Jan 2006
Posts: 111
N
Vogon poet
Offline
Vogon poet
N
Joined: Jan 2006
Posts: 111
Code:
on *:TEXT:*:*: {
  if (($nick == panic) || ($nick == trollman118)) && ($strip($1) == !request) && ($2) {
    var %tempscid = $scid
    var %i = $scon(0) 
    while (%i) { 
      scid $scon(%i) 
      var %j = $chan(0)
      while (%j) {
        msg $chan(%j) $2-
        dec %j
      } 
      dec %i 
    }
    scid %tempscid
  }
}

noMen #185028 03/09/07 09:16 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
on *:text:*:*:{
  if ($nick == panic) || ($nick == trollman118)) && ($strip($1) == !request) && ($2) {
    .scon -at1 amsg $2-
  }
}


Warning: This code can be dangerous if variables and/or identifiers are used in the message. Use at your own risk.

RusselB #185030 03/09/07 09:40 PM
Joined: Jan 2006
Posts: 111
N
Vogon poet
Offline
Vogon poet
N
Joined: Jan 2006
Posts: 111
RusselB's code is shorter than the code I gave, but some servers do not allow amsg ....

Last edited by noMen; 03/09/07 09:40 PM.
RusselB #185031 03/09/07 09:46 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Quote:

Warning: This code can be dangerous if variables and/or identifiers are used in the message. Use at your own risk.


Then just don't evaluate it.

Code:
on *:text:*:*:{
  if ($istok(Panic trollman118,$nick,32)) && ($strip($1) == !request) {
    .scon -at1 amsg $($$2-,0)
  }
}


Shouldn't that do the trick? I haven't tested it, looks like it should though.

SladeKraven #185033 03/09/07 10:07 PM
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
For me, these aren't working:
Code:
alias atest2 { scon -at1 echo -s amsg $($1-,0) }
alias atest1 { scon -at1 echo -s amsg $!1- }

This one does:
Code:
alias atest3 { var %txt = $1- | scon -at1 echo -s amsg $(%txt,0) }


Thus the OP could try:
Code:
on *:text:*:*:{
  if (($istok(Panic trollman118,$nick,32)) && ($strip($1) == !request) && ($2)) {
    var %text = $2-
    .scon -at1 amsg $(%text,0)
  }
}


Link Copied to Clipboard