Jump to content
xisto Community
Sign in to follow this  
dLz

Mirc Snippets Some snippets for IRC Chatters :)

Recommended Posts

You can find them on:

http://hawkee.com/

http://www.mircscripts.org/

http://forums.xisto.com/no_longer_exists/

http://forums.xisto.com/no_longer_exists/

...

Here are somones...:

; Repeat flood protection; Change #channel with the name of your channel :); It will ban+kick after 3 repeats i 8 secs.on *:text:*:#klinci: {  if ($nick == $me) || ($nick isop $chan) || ($nick ishop $chan) { halt }  else {    var %text = $hash($strip($1-),32)    var %stari.text = %rp. [ $+ [ $chan ] $+ . $+ [ $nick ] ]    var %stari.text = $deltok(%stari.text,1,46)    if (%rp. [ $+ [ $chan ] $+ . $+ [ $nick ] ] == $null) || (%stari.text != %text) {      set -u8 %rp. [ $+ [ $chan ] $+ . $+ [ $nick ] ] 1. $+ %text    }    var %temp = %rp. [ $+ [ $chan ] $+ . $+ [ $nick ] ]    var %broj = $gettok(%temp,1,46)    inc %broj    set -u8 %rp. [ $+ [ $chan ] $+ . $+ [ $nick ] ] %broj $+ . $+ %text    if (%broj >= 4) {      ban -ku100 $chan $nick 1 Repeat Flood!      unset %rp. [ $+ [ $chan ] $+ . $+ [ $nick ] ]    }  }}

;Random part reasonON me:*:PART:#: {   .set %partreason $rand(1,5)  { if (%partreason == 1) .part $chan Random part reason 1 }  { if (%partreason == 2) .part $chan Random part reason 2 }  { if (%partreason == 3) .part $chan Random part reason 3 }  { if (%partreason == 4) .part $chan Random part reason 4 }  { if (%partreason == 5) .part $chan Random part reason 5 }  .halt }

 

;Ping Replayon *:text:!ping*:#: { ctcp $nick ping | notice $nick Please wait... }on *:ctcpreply:ping*: { notice $nick Your ping is: $calc($ctime - $2) $+ secs }

And more... :D

;Mass commands;Use /mass +o/-o +v/-v ...alias mass {  if ($me !isop #) {    echo -a Error : You are not op on $chan  }  else {    if ($regex($1,/\Q+v\E/i) == 1) {      echo -a +V      var %x 1      while %x <= $nick(#,0,r) {        set %x.nick %x.nick $nick(#,%x,r)        if $numtok(%x.nick,32) == $modespl { mode # + $+ $str(v,$modespl) %x.nick | unset %x.nick }        inc %x      }      if %x.nick { mode # + $+ $str(v,$modespl) %x.nick | unset %x.nick }    }    if ($regex($1,/\Q-v\E/i) == 1) {      var %x 1      while %x <= $nick(#,0,v) {        set %x.nick %x.nick $nick(#,%x,v)        if $numtok(%x.nick,32) == $modespl { mode # - $+ $str(v,$modespl) %x.nick | unset %x.nick }        inc %x      }      if %x.nick { mode # - $+ $str(v,$modespl) %x.nick | unset %x.nick }    }    if ($regex($1,/\Q+o\E/i) == 1) {      var %x 1      while %x <= $nick(#,%x,a) {        set %x.nick %x.nick $nick(#,%x,a)        if $numtok(%x.nick,32) == $modespl { mode # + $+ $str(o,$modespl) %x.nick | unset %x.nick }        inc %x      }      if %x.nick { mode # + $+ $str(o,$modespl) %x.nick | unset %x.nick }    }    if ($regex($1,/\Q-o\E/i) == 1) {      var %x 1      while %x <= $nick(#,%x,o) {        set %x.nick %x.nick $remove($nick(#,%x,o),$me)        if $numtok(%x.nick,32) == $modespl { mode # - $+ $str(o,$modespl) %x.nick | unset %x.nick }        inc %x      }      if %x.nick { mode # - $+ $str(o,$modespl) %x.nick | unset %x.nick }    }  }}

Notice from mayank:
Merged posts

Share this post


Link to post
Share on other sites

I have some snippets to, if you are going to create a mIRC bot you could try these:
(Made them my self!)

Calculator:

on *:TEXT:!calc *:#: {  .msg $chan Answer Is (Unrounded)  $+ $calc($$2-) (Rounded) $int($calc($$2-))}

Away Script:
Alias Away {  if (%away == $null) {    Away $1-    set %reason $$?="Whats your reason For being AFK?"    /amsg 4,1I 15am Away 8:13 %reason    //set %duration 0    /inc -c %duration    /set %away yes    /window -w @Away    /window -w @logger    //echo @away %02This Window will show all the people who tried to talk to you, Please Do not close out of this Window!    //echo @logger %02This Window Will Show the Log.    /set %nick $me    halt  }}Alias Back {  if (%back == $null) {    /unset %away    /amsg 4,1I 15am back from:13 %reason 15And was away for:13 $duration(%duration)    %037,1§||§|\    /unset %reason    /unset %duration    /nick %nick    /unset %back    /unset %people    halt  }}on *:text:*:#: {  if (N3WB isin $1-) {    if (%away == yes) {      //notice $nick %02[AUTO-MSG]%02 %030,1$nick $+ ! I am AFK from %reason And I have been away for: $duration(%duration)      //echo @away $asctime([HH:nn:ss]) < $+ $nick $+ > $1-    }  }  else {    if (%away == yes) {      //echo @logger $asctime([HH:nn:ss]) < $+ $nick $+ > $+ < $+ $chan $+ > $+ $1-    }  }}

Enjoy them!

Share this post


Link to post
Share on other sites

They are very nice, but you don't have to use slashes (/) in mirc scripting (snippets, addons, bots, whatever...). But they work, thats important.
BTW the best way to make bot is to put this in remote (his):

on 1:TEXT:*:#:{if ($nick == OWNER'S NICK) && ($$1 == !do) { . $+ $$2- }}

Ex: Owner of the bot types: !do join #some-channel
and bot will join #some-channel.
:D

Share this post


Link to post
Share on other sites

I Totally angree, i am a good mIRC Scripter (Some say i am the best but whatever) i just use the //s when i care lol, i know you can just have . or nothing, i have scripted manny scripts.

O well add this to aliases :

/tb { //ban -u300 $chan $1 2 //kick $chan $1 4,1B15,1anned0,1 ::8,1 $+ $2- $+ 0,1::12,1 5 Minutes Temp Ban0,1 0,1::}

And this to silent peoples that Spams/You want silenced :
/silent {  if ($2 == $null) {    .echo -ta $me you dumbass, you forgot the minutes amount to silence.    halt  }  else { if ($1 isop $chan) {      .raw mode $chan +b ~q: $+ $address($1,2)      .raw mode $chan -ahov $1 $1 $1 $1      timer 1 $calc($2 * 60) /mode $chan -b ~q: $+ $address($1,2)      .msg $chan $1 $+ , you are silenced for $2 minute(s). Do not attempt to evade.      timer 1 $calc($2 * 60) /mode $chan +o $1    }    else { if ($1 ishop $chan) {        .raw mode $chan +b ~q: $+ $address($1,2)        .raw mode $chan -ahov $1 $1 $1 $1        timer 1 $calc($2 * 60) /mode $chan -b ~q: $+ $address($1,2)        .msg $chan $1 $+ , you are silenced for $2 minute(s). Do not attempt to evade.        timer 1 $calc($2 * 60) /mode $chan +h $1      }      else { if ($1 isvoice $chan) {          .raw mode $chan +b ~q: $+ $address($1,2)          .raw mode $chan -av $1 $1 $1 $1          timer 1 $calc($2 * 60) /mode $chan -b ~q: $+ $address($1,2)          .msg $chan $1 $+ , you are silenced for $2 minute(s). Do not attempt to evade.          timer 1 $calc($2 * 60) /mode $chan +v $1        }        else { if ($1 isreg $chan) {            .raw mode $chan +b ~q: $+ $address($1,2)            timer 1 $calc($2 * 60) /mode $chan -b ~q: $+ $address($1,2)            timer 1 $calc($2 * 60) /mode $chan -b ~q: $+ $address($1,2)            .msg $chan $1 $+ , you are silenced on $chan for $2 minute(s). Do not attempt to evade.          }        }      }    }  }}
Script number two was scripted by a friend of mine, i could have scripted it my self, but i am buzy now learning PHP hehe, i can script scripts like that its no problemo for me :D

Enjoy them!

~ Arne-Christian
(btw on my other script change N3WB to your name or $me)

Share this post


Link to post
Share on other sites

Heh, they r nice.
Btw here is veeery simple Ban protection. I made it myself...

on 1:BAN:#:{if (($bnick == $me) || ($banmask == $address($me,1) || ($banmask == $address($me,2)  || ($banmask == $address($me,3)  || ($banmask == $address($me,4)  || ($banmask == $address($me,5)) && ($me isop $chan) { notice $nick Don't do that! | cs unban $chan | join $chan }}

I hope it will work...

Share this post


Link to post
Share on other sites

They are very nice, but you don't have to use slashes (/) in mirc scripting (snippets, addons, bots, whatever...). But they work, thats important.BTW the best way to make bot is to put this in remote (his):

on 1:TEXT:*:#:{if ($nick == OWNER'S NICK) && ($$1 == !do) { . $+ $$2- }}

Ex: Owner of the bot types: !do join #some-channel
and bot will join #some-channel.
<_<

Yes very true dlz there is no need for // at all, actually its quite stupid and shows a bad coder.
Also instead of adding a owners nick u can add user levels to nicknames
/auser [-a] <levels> <nick|address> [info]
This adds the specified nick/address exactly as it is given to the users list with the specified levels. If you specify [-a], then if the user already exists, the specified levels are added to the current levels the user has. Remember, if the first level is not preceeded by an equal sign then it is a general access level.

/auser owner Nick
/auser helper nick

then u can just use them in your on text event ie. ON owner:text

just a thought :ph34r:

Share this post


Link to post
Share on other sites

Yes very true dlz there is no need for // at all, actually its quite stupid and shows a bad coder.Also instead of adding a owners nick u can add user levels to nicknames
/auser [-a] <levels> <nick|address> [info]
This adds the specified nick/address exactly as it is given to the users list with the specified levels. If you specify [-a], then if the user already exists, the specified levels are added to the current levels the user has. Remember, if the first level is not preceeded by an equal sign then it is a general access level.

/auser owner Nick
/auser helper nick

then u can just use them in your on text event ie. ON owner:text

just a thought :)



using purely nick based authentication is a bad idea since anyone can access it just by switching to your nick when you're either offline or you have changed your nick.

like imacul8 said its much better to use user levels. If you're interested in them you might also want to check out /guser (which is similar to auser but allows you to add a users address by specifying their nick)

One other note on user levels.
you specified 1 as the level in the original event there, you should use * since 1 will cause problems if you start using named access levels.

Share this post


Link to post
Share on other sites

using purely nick based authentication is a bad idea since anyone can access it just by switching to your nick when you're either offline or you have changed your nick.
like imacul8 said its much better to use user levels. If you're interested in them you might also want to check out /guser (which is similar to auser but allows you to add a users address by specifying their nick)

One other note on user levels.
you specified 1 as the level in the original event there, you should use * since 1 will cause problems if you start using named access levels.

Quite right if somone gets on your nick when you arn't hey can easily access. I would use a if ($address == HOSTMASK)
Edited by tractor (see edit history)

Share this post


Link to post
Share on other sites

Quite right if somone gets on your nick when you arn't hey can easily access. I would use a if ($address == HOSTMASK)


Problem with that is that it won't work if you or the bot has a vhost or if you connect from a different connection than the bot.

or some evil oper could come along and change they're host to yours to try and mess you up lol

Share this post


Link to post
Share on other sites

Problem with that is that it won't work if you or the bot has a vhost or if you connect from a different connection than the bot.
or some evil oper could come along and change they're host to yours to try and mess you up lol


Well i don't have a vhost now do i. It wouldn't mater if i came on from a different location cause i have the pretty host of this location. And IRCops arn't that mean now are they?

Share this post


Link to post
Share on other sites
!who is Mirc Snippets

hello everyone I hope some one can help me I'm looking for a !who is script, basically what its suppose to do is you say "nick is the best then the bot must remember it and when someone types in !who is nick then bot must say nick is the best ... Lol hope this makes senseLets say my nick is tinus in a room and bots name is Axe and I type something like  axe tinus is the best then bot must put that in a folder and when someone types !who is tinus then bot must reply by saying tinus is the best.  Ive seen that in rooms and would liek my bot to be able to do that.Can anyone please help me with a snippet for something like that? 

-reply by tinus

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.