Jump to content

IRCD addons


Ozzy10

Recommended Posts

on *:input:#:{
 if $right($1,1) == : && !$ctrlenter && !$istok($readini($mircini,text,commandchar) /,$left($1,1),32) {
   var %n = $line($chan,$fline($chan,* $+ $left($1,-1) $+ *,1,1),1)
   if %n { say %n $+ : $2- }
   elseif !%n { say $1- }
   haltdef
 }
}

 

Nick completer, put it in remote (alt+r).

 

If you type:

Oz: hello

And ozzy was in the channel, it would say:

Ozzy: hello

If he wasn't in the channel, it would say:

Oz: hello

 

It will only complete the nick if there's a colon ( : ) after the first word.

Link to comment
Share on other sites

  • Replies 23
  • Created
  • Last Reply

Top Posters In This Topic

The history onjoin is nice but can be better

if ppl are in level on your script.

This works for Admin, Owner, Host and Trusted level:

This works for MSN / IRCx and IRCd

 

on ^*:JOIN:#: {
 if ($nick == $me) { goto joinme }
 if (Admin_* isin $nick) || (Sysop_* isin $nick) || (Guide_* isin $nick) || (*_Bot isin $nick) { return }
 if (Guest_* isin $nick) || (> isin $nick) { goto guest }
 if (%historyroom == $null) { return }
 if (%historyroom != $null) {
   if ($$ial($nick $+ *,1).addr == $gettok($read(ulhistory.txt, w,* $+ $$ial($nick $+ *,1).addr $+ *),1,32)) { 
     set %line $readn 
     if (admin isin $level($address($nick,1))) { 
       goto adminold
     }
     if (owner isin $level($address($nick,1))) { 
       goto ownerold
     }
     if (host isin $level($address($nick,1))) { 
       goto hostold
     }
     if (trusted isin $level($address($nick,1))) { 
       goto trustedold
     }
     goto normalold
   }
   else {
     if (admin isin $level($address($nick,1))) { 
       goto adminnew
     }
     if (owner isin $level($address($nick,1))) { 
       goto ownernew
     }
     if (host isin $level($address($nick,1))) { 
       goto hostnew
     }
     if (trusted isin $level($address($nick,1))) {
       goto trustednew
     }
     goto normalnew
   }
   :adminnew {
     if ($me isowner $chan) || ($me isop $chan) {
       msg $chan 2Welcome $nick i see this is your first visit to %historyroom
       msg $chan 2You are in my Admin user list. Write 4@admin 2to see your commands.
       write -n ulhistory.txt $$ial($nick $+ *,1).addr $nick $time $date $chan
       return
     }
     else {
       return
     }   
   }
   :ownernew {
     if ($me isowner $chan) || ($me isop $chan) {
       msg $chan 2Welcome $nick i see this is your first visit to %historyroom
       msg $chan 2You are in my Owner user list. Write 4@owner 2to see your commands.
       write -n ulhistory.txt $$ial($nick $+ *,1).addr $nick $time $date $chan
       return
     }
     else {
       return
     }   
   }
   :hostnew {
     if ($me isowner $chan) || ($me isop $chan) {
       msg $chan 2Welcome $nick i see this is your first visit to %historyroom
       msg $chan 2You are in my Host user list. Write 4@host 2to see your commands.
       write -n ulhistory.txt $$ial($nick $+ *,1).addr $nick $time $date $chan
       return
     }
     else {
       return
     }
   }
   :trustednew {
     if ($me isowner $chan) || ($me isop $chan) {
       msg $chan Welcome $nick i see this is your first visit to %historyroom
       msg $chan You are in my Trusted user list. Write @trust to see your commands.
       write -n ulhistory.txt $$ial($nick $+ *,1).addr $nick $time $date $chan
       return
     }
     else {
       return
     }   
   }
   :normalnew {
     return
   }
   :adminold {
     if ($me isowner $chan) || ($me isop $chan) {
       if ($nick == $gettok($read(ulhistory.txt,%line),2,32)) {
         msg $chan 2Hi $nick Welcome back to %historyroom
         msg $chan 2You are in my Admin user list write 4@admin 2to see your commands.
         msg $chan 2You were last here on the $gettok($read(ulhistory.txt,%line),4,32) at $gettok($read(ulhistory.txt,%line),3,32)
         write -l %line ulhistory.txt $$ial($nick $+ *,1).addr $nick $time $date $chan
         return
       }
       else {
         msg $chan 2Hi $nick Welcome back to %historyroom
         msg $chan 2You are in my Admin user list write 4@admin 2to see your commands.
         msg $chan 2You were last here on the $gettok($read(ulhistory.txt,%line),4,32) at $gettok($read(ulhistory.txt,%line),3,32) and were known as $gettok($read(ulhistory.txt,%line),2,32))
         write -l %line ulhistory.txt $$ial($nick $+ *,1).addr $nick $time $date $chan
         return
       }
     }
   }
   :ownerold {
     if ($me isowner $chan) || ($me isop $chan) {
       if ($nick == $gettok($read(ulhistory.txt,%line),2,32)) {
         msg $chan 2Hi $nick Welcome back to %historyroom
         msg $chan 2You are in my Owner user list write 4@owner 2to see your commands.
         msg $chan 2You were last here on the $gettok($read(ulhistory.txt,%line),4,32) at $gettok($read(ulhistory.txt,%line),3,32)
         write -l %line ulhistory.txt $$ial($nick $+ *,1).addr $nick $time $date $chan
         return
       }
       else {
         msg $chan 2Hi $nick Welcome back to %historyroom
         msg $chan 2You are in my Owner user list write 4@owner to see your commands.
         msg $chan 2You were last here on the $gettok($read(ulhistory.txt,%line),4,32) at $gettok($read(ulhistory.txt,%line),3,32) and were known as $gettok($read(ulhistory.txt,%line),2,32))
         write -l %line ulhistory.txt $$ial($nick $+ *,1).addr $nick $time $date $chan
         return
       }
     }
   }
   :hostold {
     if ($me isowner $chan) || ($me isop $chan) {
       if ($nick == $gettok($read(ulhistory.txt,%line),2,32)) {
         msg $chan 2Hi $nick Welcome back to %historyroom
         msg $chan 2You are in my Host user list write 4@host 2to see your commands.
         msg $chan 2You were last here on the $gettok($read(ulhistory.txt,%line),4,32) at $gettok($read(ulhistory.txt,%line),3,32)
         write -l %line ulhistory.txt $$ial($nick $+ *,1).addr $nick $time $date $chan
         return
       }
       else {
         msg $chan 2Hi $nick Welcome back to %historyroom
         msg $chan 2You are in my Host user list write 4@host 2to see your commands.
         msg $chan 2You were last here on the $gettok($read(ulhistory.txt,%line),4,32) at $gettok($read(ulhistory.txt,%line),3,32) and were known as $gettok($read(ulhistory.txt,%line),2,32))
         write -l %line ulhistory.txt $$ial($nick $+ *,1).addr $nick $time $date $chan
         return
       }
     }
   }
   :trustedold {
     if ($me isowner $chan) || ($me isop $chan) {
       if ($nick == $gettok($read(ulhistory.txt,%line),2,32)) {
         msg $chan 2Hi $nick Welcome back to %historyroom
         msg $chan 2You are in my Trusted user list write 4@trust 2to see your commands.
         msg $chan 2You were last here on the $gettok($read(ulhistory.txt,%line),4,32) at $gettok($read(ulhistory.txt,%line),3,32)
         write -l %line ulhistory.txt $$ial($nick $+ *,1).addr $nick $time $date $chan
         return
       }
       else {
         msg $chan 2Hi $nick Welcome back to %historyroom
         msg $chan 2You are in my Trusted user list write 4@trust 2to see your commands.
         msg $chan 2You were last here on the $gettok($read(ulhistory.txt,%line),4,32) at $gettok($read(ulhistory.txt,%line),3,32) and were known as $gettok($read(ulhistory.txt,%line),2,32))
         write -l %line ulhistory.txt $$ial($nick $+ *,1).addr $nick $time $date $chan
         return
       }
     }
   }
   :normalold {
     return
   }
   :guest {
      msg $chan 2Welcome $nick $+ , Hope ya register your nickname soon $+ .
   }
   :joinme {
      timer.j1. $+ $rand(000,111) 1 2 check.isopowner
   }
 }
}
alias check.isopowner {
 if ($me isowner $chan) || ($me isop $chan) {
   set %historyroom $chan
 }
}

; official code by ozzy10

; edited by tha-doctor

Link to comment
Share on other sites

  • 2 months later...

Most simple dialog kick counter going smile.gif

 

Menu channel,status,menubar {
 Kick counter:/dialog -m k.count k.count
}
dialog k.count {
 title "k_counter"
 size -1 -1 57 8
 option dbu
 text "Kicks:", 4, 10 1 14 8
 text [ %kicks ], 5, 27 1 25 8
 button "Button", 3, 0 24 37 12, hide ok cancel
}
on *:kick:#:if ( $nick == $me ) /inc %kicks }

Link to comment
Share on other sites

  • 1 month later...

/m.ids { 
 var %x = 0
 if ($1- = $null) { 
   echo -a ERROR_  Please Specify +e [echo] or +w [write]  
   halt 
 }
 set %stopat $$?="Stop at id number?"
 while (%x < %stopat) { 
   inc %x
   if ($1- = +e) { 
     write -anl1 IdList.txt %x $+ ,
     .timer0 1 5 window -ke @Ids | .timer02 1 6 filter -fpw IdList.txt @Ids
     .timer03 1 15 .remove $shortfn($scriptdirIdList.txt) 
   }  
   if ($1- = +w) { write -anl1 IdList.txt %x $+ , }
 }
 return
 unset %stopat
}

 

Usage: /m.ids +e

^ echo results

Usage: /m.ids +w

^ writes to a text file called IdList.txt

Makes a list of ids like so 1,2,3,4,5,6 .....

Link to comment
Share on other sites

  • 3 years later...

For those of you that use Koach's IRC server, this is what you can use to visibly show yourself as away to mIRC (or other client) users and webchat users:

alias away { $iif($away,nick $mnick,tnick $me $+ -away) | $iif($away,away,away AFK) }

It will change your status to away and change your nickname temporarily. When you type /away again it will mark you as returned and change your name back to your primary nickname.

You can expand it to make your own away message but I couldn't be bothered so if you want to change it, feel free to do so.

 

Usage:

/away - marks you as away if you're not already.

/away - marks you as returned if you're away.

Edited by takaharu_
Link to comment
Share on other sites

it is probably recommended to do it this way for the convention of mIRC scripting...

;/away <messge> - to be set to away with the message
;/away - return from away
alias away { $iif($1,tnick $me $+ -away,nick $mnick) | $iif($1,away $1-,away) }

Only because in most scripts, if you had a remote command for example, you would automatically do /away <message> to go away, and /away to return. So it is best to continue this convention. But either way, both methods are good...

Edited by The Gate Keeper
Link to comment
Share on other sites

This is what I was going to make it into:

alias away {
  if ($away) {
    nick $mnick
    away
  }
  else {
    tnick $me $+ -away
    away $iif($1-,away $1,away AFK)
  }
}

It would've been a long, pretty $iif but I just got up :P

Edited by takaharu_
Link to comment
Share on other sites

 on 1:TEXT:*:#: {
if ($chan == $active) { halt }
  if (yournick isin $1-) { echo -a 12 ***NOTICE***4[ $converter($nick) ] 12IN 4[ $chan ] 12Text: 4[ $1- ]12 ( $+ $date $+ / $+ $time(hh:nn) $+ ) | /splay beep.wav }
}

 

 

 

put your nick in were it says yournick

 

 

for use when your in more then 1 rooms

if the room that said your nick is not the active room (the room your talking in) this will

send you a Notice the nick msg time and room name to the room you are active in

if the room is active it will halt

 

the /splay beep.wav can be removed or replaced with the sound wav of your chioce

Link to comment
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

×
×
  • Create New...