Remote script

By jeroen on Aug 04, 2009

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

Comments

Sign in to comment.
asakura   -  Aug 06, 2009

i was gunna say rofl WHAT IDIOT PUTS PASSWORD AS password xD and shud just make a text message change the password from to another you cant exactly change it via snippet if you not using that pc

 Respond  
Jonesy44   -  Aug 06, 2009

Of course, but its from the same network the host will be the same, so judt wildcard the name/ident & it will be fine. unless you're connecting from a completely different network, just use the password idea & use notices so you dont expose the password

 Respond  
jeroen   -  Aug 06, 2009

@ asakura: password is just an example to make it clear what's needs to be written there >.>

@ jonesy44: thx will try that out. Though the problem with using hostmasks is that you can't use it just anywhere as hostmasks often differ from machines :/

 Respond  
Jonesy44   -  Aug 05, 2009

I'd be happy to explain any questions if you'd like. Infact, the script is quite simple for what it does lol.

 Respond  
Jethro   -  Aug 05, 2009

What makes you think there's a complication in jonsey44's code? It's concisely understandable.

 Respond  
asakura   -  Aug 05, 2009

gosh you make it so complicated :P when its so simple xD

 Respond  
Jonesy44   -  Aug 05, 2009

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- }
}
 Respond  
asakura   -  Aug 05, 2009

uhm you have if ($2 == password) {

so basicalyl the 2nd word is password your password is password? =\ real original mate :D

 Respond  
jeroen   -  Aug 05, 2009

comments welcome..

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.