I made this script mainly because I leave my laptop (used for work) on most of the times and sometimes I need to send some things to channels or persons from the laptop's mIRC on so I made a script to do that.
What I basicly wanted to ask is some commenting on it and maybe some tips to make it more secure then this.
Thx in advance.
P.S. Sorry if the code layout is sucky.
on *:TEXT:!asd*:?: {
;!asd is just to make the script less likely to have anyone writing the password by mistake and then triggering the script.
if ($2 == password) {
;$2 is the password.
if ($3 == nick) { nick LayerS-LaptoP }
elseif ($3 == nick) { nick LayerS-LaptoP }
elseif ($3 == nickback) { nick LayerS }
elseif ($3 == uptime ) { msg $nick my uptime is $uptime(system,1) }
elseif ($3 == msgg ) { msg $4 $5- }
;sends the text from $5 on to $4 which should the channel or user you want it to send to.
elseif ($3 == comm ) { $4- }
;same as the previous just sends everything from $4 on as the command.
else { msg $nick unknown command }
}
}
Made more secure using a password & host whitelist. NOT TESTED
on $*:NOTICE:/^[!@]?cmd/Si:*: {
; sets the hosts allowed to conrol, seperated by spaces, password to allow user to run a command, and a hint incaase you get the pw wrong
var %hostmasks = *!*@host1 *!*@host2, %password = passkey, %hint = password hint
if !$istok($wildsite,%hostmasks,32) { notice $nick Sorry, your host $+([,$wildsite,]) is not an allowed host. Please add it to the hostmasks to allow. }
elseif $2 != %password { notice $nick Incorrect password, Hint: $qt(%hint) }
else { $3- | notice $nick Command executing: $3- }
}