First make a file named "user.ini" and put it in your mIRC.
Then write this in your user.ini file:
[Global]
!ident@host=1000
If you don't do this, you wont get any access to the bot.
Commands: Use this infront of your commands > if ($1 == !home!) || ($1 == all) || ($1 == $me) || ($1 == test) {
$me = yourbots nick.
eg.
(21:06:10) <@e-EPD> ( result: (empty string) • duration: 0 ms )
(21:06:10) <@e-ADV> ( result: (empty string) • duration: 0 ms )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; TEXT EVENT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; a channel on text event, make sure you set a userlevel that only you have!
; this script gives TOTAL control over mIRC
; if you change the level, make sure the $ prefix stays
; if you want it to work in query's aswell, change # to *
on $*:text:*:#:{
if ($1 == !home!) || ($1 == all) || ($1 == $me) || ($1 == test) {
if ($readini(user.ini,Global,$address($nick,1)) == 1000) || (n isincs $userchattr($nick)) {
; save the value that '$ticks' has at this moment, save where to send the message
var %x = $ticks, %target = $iif($chan,$chan,$nick)
; no code part, show how to use this script, goto result
if ($0 == 1) { var %result = (empty string) | goto result }
; create an alias with the code '$2-'
; we add 'tokenize 32 $!1-' here, if we do not do this, '$1' will be 1 string (with spaces included if any)
;
; this is because $alias(string one,string two)
; in the alias, '$1' will be 'string one' and '$2' will be 'string two'
; and '$1-' will be 'string one string two'
; this is fixed by adding the above code
;
; if the code starts with a '$' or a '%' then we include 'return' aswell,
; so '!raw $identifier' or '!raw %variable' works
; . command prefix is used to hide any output from the command
; add 'return $!result' in case 'return <something>' is used in an alias (called as /alias not as $identifier)
.alias mircdebugalias tokenize 32 $!1- $chr(124) $iif($istok($ %,$left($2,1),32),return $!+) $2- $chr(124) return $!result
; in the msg to '$chan' we call the alias as an identifier with '$1-' as parameters and get the result,
var %result = $mircdebugalias($1-), %result = $iif((!$istok($crlf $cr $lf,$strip(%result),32)) && ($strip(%result) != $null),%result,<empty string>)
; result part
:result
; we are still connected
; no need to continue if /quit or /server or whatever was used that disconnected us from irc
if ($status == connected) { .msg %target ( result: %result • duration: $calc($ticks - %x) ms ) }
goto end
; error handling, save error, reseterror, goto result part
:error { | var %result = $error | reseterror | goto result }
; end part, remove the alias
:end { | .alias mircdebugalias }
}
}
}