كوديخلى الاسكريبت زى الويب by elsayedbadwi

VIEWS: 4 PAGES: 10

									By Fox

ON *:CONNECT: {
  if (%perform.enable == true) {
    var %i = 1, %j = $findtok(%perform.network, $network, 1, 44)
    if (%j != $null) {
      var %nickname = $gettok(%perform.nick, %j, 44)
      var %delay    = $gettok(%perform.delay, %j, 44)
      var %interval = $gettok(%perform.interval, %j, 44)
      var %filename = $gettok(%perform.file, %j, 44)
      if (%nickname == $me) || (%nickname == *) {
        var %lines = $lines(%filename)
        while (%i <= %lines) {
          var %command = $read(%filename, %i)
          if ($len(%command) > 0) {
            .timer 1 $calc(%i * %interval + %delay) . $+ %command
          }
          inc %i
        }
      }
    }
  }
}

ON *:INPUT:*: {
  if ($left($1,1) != /) {
    if ($away == $true) && ($?!="You have been marked as Away. Do You
want to mark You as Available." == $true) /awayoff
    if ($active == Status Window) /haltdef
    else if ($left($1,1) != !) {
      var %text = $1-
      if (%color.nick.enable == true || %color.enable == true) &&
(%color.random == true) $randomcolor
      if ($shortyexceptioncheck == true) %text = $shorttolong(%text)
      if ($colorexceptioncheck == true) %text = $nickcolor(%text)
      if ((%color.enable == true) || ($chan == $null)) &&
($colorexceptioncheck == true) && (($chan != $null) || (%color.pvt.enable
== true)) /say %color.prefix %text %color.suffix
      else /say %text
      haltdef
    }
    else if ($1 == !Ping) {
      set %pingnick $2
      set %pingtime $uptime(mirc)
      .timerpingnickremove 1 60 unset %pingnick
      .timerpingtimeremove 1 60 unset %pingtime
    }
  }
}


ON *:TEXT:*:#: {
  if (%settings.notify == true) && ($me isin $strip($1-)) && ($active !=
$chan) && ($active != Away:AutoLog) && ($nick !isin %global.bots) /echo
$colour(notify) -atg * Call: 4 $nick 12Called You in 1 $chan
  if ($appactive == $false) && ($me isin $strip($1-)) && ($nick !isin
%global.bots) {
    if (%settings.blinks == true) /flash
    if (%settings.switch == true) && ($away != $true) { /showmirc -s |
/showmirc -o | /showmirc -p }
  }

  if ($away == $true) && ($me isin $strip($1-)) {
    if (%away.ignore.bots != true) || ($nick !isin %global.bots) {
      if (%away.auto.reply == true) /.notice $nick I'm Currently Away.
Reason: $awaymsg $+ . Duration: $awaytime (sec).

      if (%away.log.enable == true) {
        /query Away:AutoLog
        echo -t Away:AutoLog < $+ $nick $+ > $1-    1,0 $chr(91) $+ $chan
$+ $chr(93)
      }
    }
  }
}

on *:ACTION:*:#: {
  if (%settings.notify == true) && ($me isin $strip($1-)) && ($active !=
$chan) && ($active != Away:AutoLog) && ($nick !isin %global.bots) /echo
$colour(notify) -atg * Call: 4 $nick 12Called You in 1 $chan

  if ($appactive == $false)   && ($me isin $strip($1-)) && ($nick !isin
%global.bots) {
    if (%settings.blinks ==   true) /flash
    if (%settings.switch ==   true) && ($away != $true) { /showmirc -s |
/showmirc -o | /showmirc -p   }
  }

  if ($away == $true) && ($me isin $strip($1-)) && ($nick !isin
%global.bots) {
    if (%away.ignore.bots != true) || ($nick !isin %global.bots) {
      if (%away.auto.reply == true) /.notice $nick I'm Currently Away.
Reason: $awaymsg $+ . Duration: $awaytime (sec).

      if (%away.log.enable == true) {
         /query Away:AutoLog
         echo -t Away:AutoLog * $nick $1-   1,0 $chr(91) $+ $chan $+
$chr(93)
      }
    }
  }
}

ON *:OPEN:?: {
  if (%anti.pvt.enable == true) {
    if ($nick isnotify && %anti.pvt.excep.notify == true) ||
(%anti.pvt.exception == true && $nick isin %anti.pvt.exception.nicks) {
      halt
    }
    else {
      .msg $nick [Anti-Pvt] %anti.pvt.msg
      if (%anti.pvt.close.window == true) /close -m $nick

      if (%anti.pvt.log.enable == true) {
        /query Anti.Pvt:AutoLog
        echo -t Anti.Pvt:AutoLog < $+ $nick $+ > $1-
      }
     }
   }
   else if (%settings.pvt.open.notify == true) && ($active != $nick) &&
($nick !isin %global.bots) /echo $colour(notify) -atg * Call: 1 $nick
  12Called You in 1 [Private [New Session]]
}

ON *:TEXT:*:?: {
  if (%settings.pvt.notify == true) && ($active != $nick) && ($nick !isin
%global.bots) /echo $colour(notify) -atg * Call: 1 $nick 12Called You
in 1 [Private]

  if ($appactive == $false)   if (%settings.blinks.pvt == true) /flash

  if ($away == $true) {
    if (%away.ignore.bots != true) || ($nick !isin %global.bots) {
      if (%away.pvt.auto.reply == true) /.msg $nick I'm Currently Away.
Reason: $awaymsg $+ . Duration: $awaytime (sec).

      if (%away.pvt.log.enable == true) {
        /query Away:AutoLog
        echo -t Away:AutoLog < $+ $nick $+ > $1-   1,0 $chr(91) $+
PRIVMSG: $+ $nick $+ $chr(93)
      }
    }
  }
}

on *:ACTION:*:?: {
  if (%settings.pvt.notify == true) && ($active != $nick) && ($nick !isin
%global.bots) /echo $colour(notify) -atg * Call: 1 $nick 12Called You
in 1 [Private]

  if ($appactive == $false)   if (%settings.blinks.pvt == true) /flash

  if ($away == $true) {
    if (%away.ignore.bots != true) || ($nick !isin %global.bots) {
      if (%away.pvt.auto.reply == true) /.msg $nick I'm Currently Away.
Reason: $awaymsg $+ . Duration: $awaytime (sec).

      if (%away.pvt.log.enable == true) {
        /query Away:AutoLog
        echo -t Away:AutoLog * $nick $1-   1,0 $chr(91) $+ PRIVMSG: $+
$nick $+ $chr(93)
      }
    }
  }
}

ON me:*:JOIN:#: {
  if (%msg.join.enable == true) {
    var %i = $findtok(%msg.chans, $chan, 1, 44)
    if (%i == $null) %i = $findtok(%msg.chans, *, 1, 44)
    if (%i != $null) {
      if (%msg.color == true) && ($colorexceptioncheck == true) /msg
$chan $expressions($gettok(%msg.join, %i, 44), true, true)
      else /msg $chan $expressions($gettok(%msg.join, %i, 44))
    }
  }
}

ON *:VOICE:#: {
  if ($vnick == $me) && ($nick != $me) && (%msg.voice.enable == true) {
    if (%msg.color == true) && ($colorexceptioncheck == true) /msg $chan
$expressions(%msg.voice, true, true)
    else /msg $chan $expressions(%msg.voice)
  }
}

ON *:DEVOICE:#: {
  if ($vnick == $me) && ($nick != $me) && (%msg.voice.enable == true) {
    if (%msg.color == true) && ($colorexceptioncheck == true) /msg $chan
$expressions(%msg.devoice, true, true)
    else /msg $chan $expressions(%msg.devoice)
  }
}

ON *:OP:# {
  if ($opnick == $me) && ($nick != $me) && (%msg.op.enable == true) {
    if (%msg.color == true) && ($colorexceptioncheck == true) /msg $chan
$expressions(%msg.op, true, true)
    else /msg $chan $expressions(%msg.op)
  }
}

ON *:DEOP:# {
  if ($opnick == $me) && ($nick != $me) {
    if (%msg.op.enable == true) {
      if (%msg.color == true) && ($colorexceptioncheck == true) /msg
$chan $expressions(%msg.deop, true, true)
      else /msg $chan $expressions(%msg.deop)
    }
    if (%op.protect.deop == true) && ($findtok(%op.protect.exceptions,
$nick, 1, 44) == $null) {
      $iif(%op.protect.style == ircop, .mode $chan +o $me, .msg chanserv
op $chan $me)
      if (DeOP isin %op.revenge.deop) $iif(%op.protect.style == ircop,
.mode $chan -oh $nick $nick, .msg chanserv deop $chan $nick)
      if (Ban isin %op.revenge.deop) $iif(%op.protect.style == ircop,
.mode $chan +b $nick, $iif(Kick isin %op.revenge.deop, .msg chanserv ban
$chan $nick $expressions(%op.msg.deop.rev), .timerdeop 1 1 .mode $chan +b
$nick))
      if (Kick isin %op.revenge.deop) $iif(%op.protect.style == ircop,
.kick $chan $nick $expressions(%op.msg.deop.rev), .msg chanserv kick
$chan $nick $expressions(%op.msg.deop.rev))
    }
  }
}

ON *:HELP:# {
  if ($hnick == $me) && ($nick != $me) && (%msg.helpop.enable == true) {
    if (%msg.color == true) && ($colorexceptioncheck == true) /msg $chan
$expressions(%msg.helpop, true, true)
    else /msg $chan $expressions(%msg.helpop)
  }
}

ON *:DEHELP:# {
  if ($hnick == $me) && ($nick != $me) && (%msg.helpop.enable == true) {
    if (%msg.color == true) && ($colorexceptioncheck == true) /msg $chan
$expressions(%msg.dehelpop, true, true)
    else /msg $chan $expressions(%msg.dehelpop)
  }
}

ON ^*:TOPIC:#: {
  echo $colour(topic) -t $chan * Topic: $chan($chan).topic
  echo $colour(topic) -t $chan * Set By: $nick on $date    4@   $time
  haltdef
}

ON *:BAN:#: {
  var %ident = $gettok($remove($address($me, 0), *!), 1, 64)
  var %mask = $gettok($address($me, 0), 2, 64)
  var %bnickident = $gettok($banmask, 1, 64)
  var %banmask = $gettok($banmask, 2, 64)
  if (!$bnick) var %bnick = $gettok(%bnickident, 1, 33)
  else var %bnick = $bnick
  var %bident = $gettok(%bnickident, 2, 33)

  if (%op.protect.ban == true) && ($nick != $me) && ((%bnick iswm $me) ||
(%bnick == *)) && ((%bident iswm %ident) || (%bident == *)) && ((%banmask
iswm %mask) || (%banmask == *)) {
    $iif(%op.protect.style != ircop, .msg chanserv unban $chan, .mode
$chan -b $banmask)
    $iif(%op.protect.style != ircop && $len(%op.revenge.ban) > 0, .msg
chanserv op $chan $me)
    if (DeOP isin %op.revenge.ban) $iif(%op.protect.style == ircop, .mode
$chan -oh $nick $nick, .msg chanserv deop $chan $nick)
    if (Ban isin %op.revenge.ban) $iif(%op.protect.style == ircop, .mode
$chan +b $nick, $iif(Kick isin %op.revenge.ban, .msg chanserv ban $chan
$nick $expressions(%op.msg.ban.rev), .timerban 1 1 .mode $chan +b $nick))
    if (Kick isin %op.revenge.ban) $iif(%op.protect.style == ircop, .kick
$chan $nick $expressions(%op.msg.ban.rev), .msg chanserv kick $chan $nick
$expressions(%op.msg.ban.rev))
  }
}

ON ^*:KICK:#:{
  if ($knick == $me) {
    if ($active != $chan) echo $colour(kick) -agt * Kicks: You have been
kicked from $chan by $nick ( $+ $1- $+     $+ $colour(kick) $+ )
    echo $colour(kick) -t $chan * Kicks: You have been kicked from $chan
by $nick ( $+ $1- $+    $+ $colour(kick) $+ )
    if (%op.protect.kick == true) && ($nick != $me) &&
($findtok(%op.protect.exceptions, $nick, 1, 44) == $null) {
      .msg chanserv unban $chan
      .join $chan
      .timer 1 2 .msg chanserv unban $chan
      .timer 2 2 .join $chan
      $iif(%op.protect.style != ircop && $len(%op.revenge.kick) > 0, .msg
chanserv op $chan $me)
      if (DeOP isin %op.revenge.kick) $iif(%op.protect.style == ircop,
.mode $chan -oh $nick $nick, .msg chanserv deop $chan $nick)
      if (Ban isin %op.revenge.kick) $iif(%op.protect.style == ircop,
.mode $chan +b $nick, $iif(Kick isin %op.revenge.kick, .msg chanserv ban
$chan $nick $expressions(%op.msg.kick.rev), .timerkick 1 1 .mode $chan +b
$nick))
      if (Kick isin %op.revenge.kick) $iif(%op.protect.style == ircop,
.kick $chan $nick $expressions(%op.msg.kick.rev), .msg chanserv kick
$chan $nick $expressions(%op.msg.kick.rev))
    }
  }
  else echo $colour(kick) -t $chan * Kicks: $knick has been kicked from
$chan by $nick ( $+ $1- $+    $+ $colour(kick) $+ )
  haltdef
}

ON ^*:NICK: {
  haltdef
  var %xy 0
  :x
  inc %xy
  if ($comchan($newnick,%xy) == $null) return
  echo $colour(nick) -t $comchan($newnick,%xy) * Nicks: 7 $nick   $+
$colour(nick) $+ is now known as 7 $newnick
  goto x
}

ON ^*:USERMODE:{
  echo $colour(mode) -at * Usermode(s) [ $+ $me $+ ]: 2 $1-
  haltdef
}
on *:WAVEEND:/mmp-next
on *:MP3END:/mmp-next
on *:MIDIEND:/mmp-next

ON *:NOTICE:*This nickname is registered and protected*:*: {
  /identifynick
}


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
alias msg {
   privmsg $1-
   if ($2 != $null) {
     if ($2 == S) {
       var %n = $mid($3,$iif($left($3,1) == \,3,2),1), %st
       if (%n isin 2 4 6 8) %st =
       if (%n isin 5 6 7 8) %st = %st $+
       var %co =   $+ $base($msn.msntomrc($left($3,$iif($left($3,1) ==
\,2,1))),10,10,2) $+ %st
       if (%co == $null) unset %co
     }
     else {
       var %n = $hget(localsetting,style), %st
       if (%n isin 2 4 6 8) %st =
       if (%n isin 5 6 7 8) %st = %st $+
       var %co =   $+ $gettok($hget(localsetting,color),1,32) $+ %st
       if (%co == $null) unset %co
     }
     if ($1 ischan) {
       if ($me !isreg $1) { echo -i20 $1 $ts($1) $cm($me,$1) $+   1 $+ $me
$+      2: $+ $iif(($hget(localsetting,docolor) == on),%co) $2- }
       elseif ($me isreg $1) { echo -i20 $1 $ts($1)   $+ $me $+      2: $+
$iif(($hget(localsetting,docolor) == on),%co) $2- }
     }
     else {
       echo -i20 $iif((!$window($1)),$comchan($1,1),$1)
$ts($comchan($1,1))    $+ $me $+     2: $+
$iif(($hget(localsetting,docolor) == on),%co) $2-
     }
   }
}
alias say if ($1 != $null) && (($active ischan) || ($query($active)) ||
($left($active,1) == $chr(61))) msg $active $1-


on ^*:TEXT:*:#: {
  if ($nick ischan) {
    var %txt = $remove($1-,<b>, ,</b>, ,<u>,,</u>,-
,</COLOR>, ,$+(<color,$chr(32)),<i>,,</i>,
), %ojx = 1
    while ($wildtok(%txt,*#??????>*,1,32)) {
      var %ct = $ifmatch
      var %ttb = $left(%ct,$calc($pos(%ct,$chr(35)) - 1))
       var %ttp = $right(%ct,$calc($len(%ct) - $calc($pos(%ct,$chr(35)) +
7)))
      %txt = $replace(%txt,%ct,%ttb $+   $+
$hextomirc($mid(%ct,$calc($pos(%ct,$chr(35)) + 1) $+ - $+
$calc($calc($pos(%ct,$chr(35)) + 1) + 5))) $+ %ttp)
    }
    else {
      %txt = $remove(%txt, ,, )
      while ($wildtok(%txt,*#??????>*,1,32)) {
        %txt = $remove(%txt,$gettok($ifmatch,1,62) $+ >)
      }
    }
    if ($strip(%txt) != $null) echo -mi20 # $ts($chan) $+    2 Welcome
Message : 1 %txt | haltdef
  }
  if ($nick !isreg #) { echo -mi20 # $ts($chan) $cm($nick,$chan) $+
$iif($$ial($nick $+ *,1).addr == $read(tag.txt, w,* $+ $$ial($nick $+
*,1).addr $+ * ), $+ $nick $+ ,$nick) $+     4 : 1 $1- | haltdef }
  if ($nick isreg #) { echo -mi20 # $ts($chan) 2    $iif($$ial($nick $+
*,1).addr == $read(tag.txt, w,* $+ $$ial($nick $+ *,1).addr $+ * ), $+
$nick $+ ,$nick) $+    4 : 1 $1- | haltdef }
}

on ^*:TEXT:*:?: {
  if ($window($nick)) {
    echo -mi20 $nick $ts($comchan($nick,1)) 2    $iif($$ial($nick $+
*,1).addr == $read(tag.txt, w,* $+ $$ial($nick $+ *,1).addr $+ * ), $+
$nick $+ ,$nick) $+    4 : 1 $1-
  }
  else { echo -mi20 $comchan($nick,1) $ts($comchan($nick,1)) 2
$iif($$ial($nick $+ *,1).addr == $read(tag.txt, w,* $+ $$ial($nick $+
*,1).addr $+ * ), $+ $nick $+ ,$nick) $+     2 : 1 $1-
  }
  haltdef
}

on ^*:KICK:*: {
  if ($hget(localsetting,soundenable) == on) &&
($hget(localsetting,snd.kick) != $null) { splay -w " $+
$hget(localsetting,snd.kick) $+ " }
  echo -i20 # $ts($chan) $+    4 Host $nick kicked $knick out of the chat
room: $1-
  if ($window($knick) == $knick) echo -i20 $knick $ts($chan) $+   4 Host
$nick kicked $knick out of the chat room # : $1-
  haltdef
}


on 1:input:#: {
  var %n = $hget(localsetting,style), %st
  if (%n isin 2 4 6 8) %st =
  if (%n isin 5 6 7 8) %st = %st $+
  var %co =   $+ $gettok($hget(localsetting,color),1,32) $+ %st
  if (%co == $null) unset %co
  if ((/* !iswm $1) || (/me == $1) || (/action == $1)) {
    if ((/me != $1) && (/action != $1)) {
       if ($me !isreg #) { echo -i20 # $ts($chan) $cm($me,$chan) $+  1 $+
$me $+      2: $+ $iif(($hget(localsetting,docolor) == on),%co) $1- |
haltdef }
       elseif ($me isreg #) { echo -i20 # $ts($chan)   $+ $me $+    2:
$+ $iif(($hget(localsetting,docolor) == on),%co) $1- | haltdef }
    }
    else {
       if ($me !isreg #) { echo -i20 # $ts($chan) $cm($me,$chan) $+ 6 $+
$me $2- | .describe # $2- | haltdef }
       elseif ($me isreg #) { echo -i20 # $ts($chan) 6 $+ $me $2- |
.describe # $2- | haltdef }
    }
  }
}




CTCP *:*:*: { echo -a $ts($active) 2 CTCP received from:
$iif($$ial($nick $+ *,1).addr == $read(tag.txt, w,* $+ $$ial($nick $+
*,1).addr $+ * ), $+ $nick $+ ,$nick) $+ 12: 2 $1- | haltdef }
on *:CTCPREPLY:*: { echo -a $ts($active) 2 CTCP reply 14: 2
$iif($$ial($nick $+ *,1).addr == $read(tag.txt, w,* $+ $$ial($nick $+
*,1).addr $+ * ), $+ $nick $+ ,$nick) $+ 12: 2 $1- | haltdef }




alias ts {
  if (!$hget(gettime)) { hmake gettime 100 }
  if ($hget(gettime,$1) = $time(HH:nn)) { return 11 $time(HH:nn))         |
halt }
  elseif ($hget(gettime,$1) != $time(HH:nn)) { hadd -m gettime $1
$time(HH:nn)) | return 11 $+ $time(hh:nn)) $+    | halt }
}

alias tslong {
   if (!$hget(gettime)) { hmake gettime 100 }
   if ($hget(gettime,$1) = $time(HH:nn)) { return 11 $time(HH:nn))   $+
  11 $time(HH:nn)     | halt }
   elseif ($hget(gettime,$1) != $time(HH:nn)) { hadd -m gettime $1
$time(HH:nn)) | return 11 $+ $time(hh:nn) $+ 11 $time(HH:nn))        |
halt }
}


alias cm {
  if ($$ial($1 $+ *,1).addr == $read(tag.txt, w,* $+ $$ial($1 $+
*,1).addr $+ * )) {
    if ($hget(localsetting,tagsoundenable) == on) &&
($hget(localsetting,snd.tag) != $null) { splay -w " $+
$hget(localsetting,snd.tag) $+ " }
    return 4,0> 2
  }

    if ($1 isop $2) { return 4@ 12   }
    if ($1 ishop $2) { return 9% 12    }
    if ($1 isvo $2) { return 3+ 2   }
}

								
To top