mIRC Home    About    Download    Register    News    Help

Print Thread
#71648 17/02/04 12:03 AM
Joined: Feb 2004
Posts: 9
M
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Feb 2004
Posts: 9
ok here i go, say i want to be able to have ppl add their own scritpts to my bot, but from their computer, somthing like this
if <remoteuser> types !Set !HisCommand !WhateverTheCommandSays

it will create
on remoteuse:TEXT:!HisCommand:*:{ msg whatever the command says }

many thnx for any help

#71649 17/02/04 12:24 AM
Joined: Dec 2003
Posts: 219
F
Fjord artisan
Offline
Fjord artisan
F
Joined: Dec 2003
Posts: 219
Hi!

You want people to upload .mrc or .ini files to your bot and to be loaded automatically?
Well, it's quite UNSECURE... I recommend you to disable /run and /dll commands 1st as anyone can run malicious code (mIRC's Options > Other > Lock).
Then you'll have to turn on Auto DCC Get (mIRC's Options > DCC > Auto-get file)
and add a little remote:

on remoteuser:FILERCVD:*.mrc,*.ini:/load -rs $filename

Some code parsing to check for malware could be a "plus" if you do not trust "remoteuser" (read this thread )

#71650 17/02/04 02:41 AM
Joined: Feb 2004
Posts: 13
M
Pikka bird
Offline
Pikka bird
M
Joined: Feb 2004
Posts: 13
yup pretty bad idea to do that , someone with a little knowledge of mirc script kan easily do really bad things on your computer '/remove' is just an example of bad code they might include...

#71651 17/02/04 03:18 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
you could try this, but as others have said, i think allowing remote users to actually create commands is a bit risky, it would be better to create a file with triggers and replies etc.

Code:
on 99:TEXT:!set *:*:{
  if (($left($$2,1) == !) &amp;&amp; if ($left($$3,1) == #) ) {
    write -il1 remote.user.triggers.mrc ON 99:TEXT: $+ $2 $+ :* :msg $3 $replace($4- ,|,| ,$,$ ,%,% ,$chr(123), $+ $chr(123) ,$chr(125), $+ $chr(125) )
    reload -rs remote.user.triggers.mrc
    ;^ I have had problems with reload so if it dont work uses the bwlow line
    ;unload -rs remote.user.triggers.mrc | load -rs remote.user.triggers.mrc
  }
}
; replace 99 with the remoteuser privilage level.


the $replace fixes | $ % { } from being evaluated, however be warned there might be some others i cant think of right now.

Usage is as follows in channel or pm, !set !mytrigger #achannel ye old message here
later in channel or pm, !mytrigger
and the bot does MSG #achannel ye old message here


PS: i didnt fully test that either so cavetemptor


Link Copied to Clipboard