Add to Google

Mirc Snippets - Some snippets for IRC Chatters :)

Pages: 1, 2
free web hosting
Open Discussion > CONTRIBUTE > Computers > Programming Languages > Others

Mirc Snippets - Some snippets for IRC Chatters :)

dLz
You can find them on:
www.hawkee.com
www.mircscripts.org
www.mircscripts.com
www.mirc.net
...
Here are somones...:
CODE

; 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 ] ]
   }
 }
}


CODE

;Random part reason
ON 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
}


CODE

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


And more... smile.gif
CODE

;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

 

 

 


Reply

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

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


Away Script:
CODE
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!

 

 

 


Reply

dLz
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):

CODE

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.
smile.gif

Reply

Arne-Christian
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 :
CODE
/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 :
CODE
/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 biggrin.gif

Enjoy them!

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

Reply

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

CODE

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...

Reply

imacul8
QUOTE(dLz @ Dec 25 2005, 04:20 AM) *

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):

CODE

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.
smile.gif


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 smile.gif

Reply

tractor
Very nice though im not much into full out scripts. Im more of Dialog on text dude

Reply

Urza
QUOTE(imacul8 @ Jul 12 2006, 08:58 AM) *

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 smile.gif



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.

Reply

tractor
QUOTE(Urza @ Oct 4 2006, 11:23 PM) *

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)

Reply

Urza
QUOTE(tractor @ Oct 5 2006, 06:41 AM) *

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

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Pages: 1, 2
Recent Queries:-
  1. how to use snippet mirc - 0.51 hr back. (1)
  2. mirc snippets - 4.38 hr back. (1)
  3. irc snippet - 12.61 hr back. (4)
  4. $regex mirc snippet - 26.01 hr back. (1)
  5. script ping replay irc - 28.75 hr back. (1)
  6. irc snippets - 33.90 hr back. (1)
  7. snippets mirc - 51.33 hr back. (1)
  8. cool mirc snippets - 51.39 hr back. (1)
  9. code irc !adduser $adress - 52.87 hr back. (1)
  10. snippet ctcp version kick ban - 60.42 hr back. (1)
  11. best mirc snippets - 66.07 hr back. (1)
  12. query snippits irc - 99.02 hr back. (1)
  13. snippet mirc - 108.39 hr back. (1)
  14. snippet bad channels - 108.56 hr back. (1)
Similar Topics

Keywords : mirc, snippets, snippets, irc, chatters

  1. Need Help With Mirc
    (0)
  2. I Am Looking For Ideas For A Mirc Addon
    I want your ideas (2)
    Well im currently between 2 projects that im scripting and im bored with them haha!! Just
    looking for ideas for something else i can make... Maybe just sumthing little that u want made, i
    will make it for you and release it here. I have a fairly wide range of scripting knowledge and i
    will try to make most things... Always looking to learn more things also Ta....
  3. Mirc 3d Rendering
    (0)
    QUOTE ======================================================================5/26/2006===
    Talons Simple 3D Tutorial irc.webchat.org:6667 in
    #mIRC,#help.mIRC ==================================================================================
    As a programmer, I often find myself trying to write things that already exist. It gives some
    satisfaction to say, "I did this on my own." even if it is not as good as what is already out there.
    Nothing is more impressive than your own work, even if it is not as good. It's an accompli....
  4. Socket Status Addon For Mirc
    (2)
    This addon will display the status of your open sockets (if there is any) Displays displays the
    Name, IP, Port, Status - Bytes sent/received & last Sent/recieved Has options to refresh the status,
    close a socket and close all sockets. Copy and paste this code below into your remotes (alt + r) To
    run the dialog u can simply type /sockstats or u can add a popup to your menubar or wherever to open
    it. ie. &Socket Status:/sockstats in your status popup section (alt + p) **IF you have no active
    sockets it wont open the dialog, it will just return no open sockets in your ....
  5. Sockets Help (mirc)
    (8)
    hello, i was wondering if someone would be able to help me out a bit. Im looking to get some info
    from my forums using sockets and mIRC, however the info i want requires that you be logged in. I
    know that it would require sockwrite POST something, but im not really sure how to use that :S
    anyways, here is the source to the login section (HTML) HTML form action ="
    http://www.altscripts.trap17.com/forum/index.php?action=login2 " method=" post " style="
    margin: 3px 1ex 1px 0pt; text-align: right; "> input name =" user " size=" 10 "
    type=" text ">....
  6. How To Customize The Look Of Your Mirc Events Part 2
    (6)
    Well in part 1 of How To Customize The Look Of Your Mirc Events i covered some channel events, so
    now i will cover the events for in a private chat. Plus some extra stuff.... ** To change the look
    of the other persons text u again use a on text event CODE on ^*:TEXT:*:?: {
      echo -t $query($nick) ( $+ $nick $+ ) $1-   halt }
    ** To change the look of your own input CODE on *:INPUT:?: {   if
    ($left($1,1) != /) {     .msg $active $1-     echo....
  7. How To Customize The Look Of Your Mirc Events
    (4)
    Well im sure that a lot of you just use mIRC for chatting and do not realise that you can actually
    use it to code cool stuff. You can also change the way your events look and i am going to explain
    how here. Starting with the on join event - which triggers when you and other users join a channel.
    Instead of having just the plain * Now talking in #channel and * nick has joined #channel you can
    make it look fancy ie. (Join/nick) (nick@address) and its not hard to do. CODE on
    ^*:JOIN:#: {   echo -t $chan (Join/ $+ $nick $+ ) (....
  8. Control Parts Of Msn Through Mirc
    (7)
    Control your MSN, or return various information such as nickname, status, etc.. Usage:
    $msn(valuetype) Valuetypes : returnvalue online : $true or $false indicating
    wheter your signed in or not (actually $true indicates status but was added to have an
    independent online checker) status : returns the status of MSN (Busy,Online,Invisible etc)
    nickname : your nickname email : your email ie. //echo -a $msn(nickname) will return ur msn
    nickname. user : $true when succesful $false when not Methods: Blocked CanPage
    Frie....
  9. Few Mirc Snippets I Have Scripted
    (19)
    Just a few things that may come in handy /smile.gif" style="vertical-align:middle" emoid=":)"
    border="0" alt="smile.gif" /> Backwards text snippet : will revers the text u input CODE bck {
      var %x = 1,%bck   while (%x <= $len($1-)) { %bck =
    $mid($1-,%x,1) $+ %bck | inc %x }   return %bck } Usage: $bck(text)
    ie. //echo -a $bck(hello everyone) Returns: enoyreve olleh Random letter/number generator :
    creates a random letter/number combo for the length specified. CODE rx {   if ($1 == &....

    1. Looking for mirc, snippets, snippets, irc, chatters

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for mirc, snippets, snippets, irc, chatters

*MORE FROM TRAP17.COM*
advertisement



Mirc Snippets - Some snippets for IRC Chatters :)



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE