mIRC Home    About    Download    Register    News    Help

Print Thread
Halting text #238571 09/08/12 01:26 PM
Joined: Dec 2010
Posts: 89
D
dominic_eddy Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: Dec 2010
Posts: 89
I've made a script which makes my channel look different, it'll halt default text such as the normal quit messages, join messages, part messages and nick changes. The script works good, it halts the text and i use /echo to change the look, and i've made it only affect my channel, althoguh, i have a problem. I have no problem with the part and join codes because part and joins only affect one channel, whereas quits and nicks affect all messages. There for it halts the text on ALL channels, which is not what i wanted, i only wanted to change the appearance of MY channel. I think i know how to fix this, i just need the text to halt if its on my channel, but since quit messages go on all channels, i don't know how i'd specify it so that it would only halt the message on my channel. I added a code if ($nick ison (#my channel)) { but it still halted the text on all channels, for people in my channels. If someone wasn't on my channel and they quit, the normal message would pop up, but if someone quits, and their on my channel, it'll halt the text on all channels, and i'd only know they;d quit because the echo'd message on my channel. I need the text to ONLY halt on my channel, liek the join and part scripts.

Please help me <3

P.S. Also... is their any way of modifying the look of a nicklist? My channel has a bot and it uses ID's, if i could add their ID's in front of their name in the nicklist that would be awesome.

Last edited by dominic_eddy; 09/08/12 01:45 PM.
Re: Halting text [Re: dominic_eddy] #238572 09/08/12 03:13 PM
Joined: Jan 2004
Posts: 1,276
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,276
You can't stop it for only one channel. You'll need to halt all of it, and then recreate it in every channel you want. You can use $comchan to determine which channels to display the text in.

Re: Halting text [Re: Loki12583] #238585 10/08/12 10:37 AM
Joined: Dec 2010
Posts: 89
D
dominic_eddy Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: Dec 2010
Posts: 89
How would i add this into my script? I'm not very good when it comes to stuff like $comchan, could you add it for me?
http://pastebin.com/pR0sZLmP

P.S. I hear that $comchan is for getting the channels that $me and $nick is on? This script is not made for a channel bot, it's a script which all users will individualy be given and maybe $comchan isn't the correct thing? dunno smile

Re: Halting text [Re: dominic_eddy] #238591 10/08/12 03:06 PM
Joined: Jan 2004
Posts: 1,276
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,276
Code:
on ^*:quit:{
  var %addr = ( $+ $address $+ ), %msg = ( $+ $1- $+ )

  var %i = 1, %n = $comchan($nick,0)
  while (%i <= %n) {
    if ($comchan($nick,%i) != #test) {
      echo -i2tc quit $v1 * $nick($v1,$nick).pnick %addr Quit %msg
    }
    inc %i
  }
  haltdef
}


My formatting mimics the default text, you can change it back to what you want. Note that you can use /echo -c quit to use the quit event color. This does not account for the display setting of the event (default,status,channel,hide); as I don't know of an identifier to return these, implementing this functionality would be wasted if you're not using it anyway.

Re: Halting text [Re: Loki12583] #238637 14/08/12 10:03 AM
Joined: Dec 2010
Posts: 89
D
dominic_eddy Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: Dec 2010
Posts: 89
thanks, but this script echo's ALL Quit messages, when i added the 'if ($nick ison $chan) {' statement it only halted the text if someone was on my channel, hense reducing the ammount of CPU usage (or whatever its called) and i'd like it to stay that way laugh? I'm not really good at knowing where to add it in to this new script though. Also, how would i go about making the quit message echo'd different for my channel (#test) because at the moment, its making all the quit messages look normal on all other channels, but doesn't appear with anything in #test, i want it too look normal in all channels (like you've done) but echo something different in my channel laugh please help, Thanks! smile

Re: Halting text [Re: dominic_eddy] #238640 14/08/12 12:20 PM
Joined: Jan 2004
Posts: 1,276
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,276
Code:
on ^*:quit:{
  var %chan = #test
  if ($nick !ison %chan) { return }

  var %addr = ( $+ $address $+ ), %msg = ( $+ $1- $+ )

  var %i = 1, %n = $comchan($nick,0)
  while (%i <= %n) {
    if ($comchan($nick,%i) != %chan) {
      echo -i2tc quit $v1 * $nick($v1,$nick).pnick %addr Quit %msg
    }
    else {
      ;echo -i2tc quit $v1 * custom message line
    }
    inc %i
  }
  haltdef
}

Re: Halting text [Re: Loki12583] #238653 15/08/12 10:21 AM
Joined: Dec 2010
Posts: 89
D
dominic_eddy Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: Dec 2010
Posts: 89
you musta accidently added that ; infront of echo, because it didn't work at first smile but no problem, removed, and it works great! thanks!

Re: Halting text [Re: dominic_eddy] #238655 15/08/12 12:17 PM
Joined: Jul 2006
Posts: 3,582
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,582
The ; was there on purpose, a ; at the beginning of a line makes that line a comment


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Halting text [Re: Wims] #238669 16/08/12 11:55 AM
Joined: Dec 2010
Posts: 89
D
dominic_eddy Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: Dec 2010
Posts: 89
im sorry to be a pain but i have one last thing to request, how would i convert this script so that it also works for on NICK events? the same problem occurs when people change nicknames as with my previous QUIT problem. =]

Re: Halting text [Re: Wims] #238670 16/08/12 12:40 PM
Joined: Jan 2004
Posts: 1,276
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,276
You should be able to accomplish this without coming here for help. See "/help on nick" in mirc.

Re: Halting text [Re: dominic_eddy] #238695 19/08/12 07:16 PM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
You can combine them and share one alias like so:
Code:
on ^*:quit: qn $nick $1-
on ^*:nick: qn $newnick
alias -l qn {
  var %chan = #test
  if ($1 !ison %chan) { return }
  var %addr = ( $+ $address $+ ), %msg = ( $+ $2- $+ )
  var %i = 1, %n = $comchan($1,0)
  while (%i <= %n) {
    if ($comchan($1,%i) != %chan) {
      var %v1 = $v1
      echo -i2tc %v1 * $nick(%v1,$1).pnick %addr $iif($event == quit,Quit %msg,Nick is now known as $newnick)
    }
    else {
      echo -i2tc %v1 * $iif($event == quit,custom message line for quit,custom message line for Nick)
    }
    inc %i
  }
  haltdef
}
I haven't tested this but should work as per your wish.

Re: Halting text [Re: Tomao] #238696 19/08/12 07:36 PM
Joined: Jul 2006
Posts: 3,582
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,582
I'd use $wildsite instead of $address, and you're using %v1 instead of %chan in the else part wink

Last edited by Wims; 19/08/12 08:39 PM.

Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Halting text [Re: Wims] #238863 02/09/12 12:48 PM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Thanks for your advice, Wims.