amsg alias / another xmsg / anti amsg

Release your script here.
State:
- Author
- What it does
- Perhaps a little guide.
- Also, if the snippet is of any use to the community, it has a chance of getting posted on the main page, so don't hesitate to submit/ask!

amsg alias / another xmsg / anti amsg

Postby Cristian » Tue Mar 25, 2008 2:18 pm

Code: Select all
;# 
;# visit http://sp00fed.org for updates or support.
;# script by Sumsar
;#

;#
;# This script uses the theme from KTE if its loaded, otherwise it would use its own.
;# If it uses its own theme and you dont like the current theme it can be changed.
;#
;# the alias ::kte, checks if the KTE script is loaded.
;# the alias ::theme, is what you see when you type /amsg text.
;# the alias ::exclude, is where you put in the channels, where you dont want to send amsg's to. Seperated with comma.
;# the alias ::kte-file, is where you can change the kte-dyn file name, if it doesnt match your current one.
;#
;# NOTE: If another amsg alias exists, then this script wont work.
;#       You could change the name of the alias to ex. xmsg, just remember the name of the alias, when you do a amsg.
;#
;# NOTE2: This script wont send messages to channels where chanmode T is set (Quakenet).

;# Tested and works on version 6.15

alias -l ::kte-file { return kte-dyn.mrc }
alias -l ::theme { return $+($chr(2),$chr(40),$chr(2),$1,$chr(2),$chr(41),$chr(2)) }
alias -l ::exclude { return #takeover }

alias -l ::kte { var %x = $script(0),%f = 0 | while (%x) { if ($::kte-file == $nopath($script(%x))) { var %f = 1 } | dec %x } | return %f }
alias amsg {
  if ($1) {
    var %x = $comchan($me,0),%c
    while (%x) {
      if (!$istok($::exclude,$comchan($me,%x),44)) && (T !isincs $chan($comchan($me,%x)).mode) {
        var %c = $addtok(%c,$comchan($me,%x),44)
        if ($::kte) { set -u0 %:echo echo -ti2c own $comchan($me,%x) | $winter.text($me,$1-) }
        else { echo -ti2c own $comchan($me,%x) $::theme($me) $+(:,$1-) }
      }
      dec %x
    }
    .raw -q PRIVMSG %c : $+ $1-
  }
}
Cristian
proof of advance
proof of advance
 
Posts: 282
Joined: Sun Nov 04, 2007 3:02 pm
Location: Denmark
Authnick: Sumsar

Return to Mirc Scripting Release

Who is online

Users browsing this forum: No registered users and 2 guests

cron