Simple load/unload script

By Bigboy0910 on Dec 31, 2006

To use this type !load , or !unload . You can edit it to be .mrc and not .ini. When you specify the file just the file name not with .ini, .mrc etc..etc..

Where it says Bot's Owner's Nick, this script is set up to only let the owner of the bot be able to load/unload scripts. You can edit this to include ops, hops, etc..etc..

on *:text:!load*:#:{
  if ($nick == <bot's owner's nick>) {
    load -rs $2- $+ .ini
    /msg $chan $2- $+ .ini Loaded!
  }
}
on *:text:!unload*:#:{
  if ($nick == <bot's owner's nick>) {
    unload -rs $2- $+ .ini
    /msg $chan $2- $+ .ini Unloaded!
  }
}

Comments

Sign in to comment.
Memoli   -  Oct 03, 2010

@SebastianB (i know its long time ago)

if you want load/unload only "file1.ini" use this ...

on *:text:!bot on:#:{
if ($nick isop $chan) {
load -rs file1.ini
/msg $chan file1.ini Loaded!
}
}
on *:text:!bot off:#:{
if ($nick isop $chan) {
unload -rs file1.ini
/msg $chan file1.ini Unloaded!
}
}

but so every +o can unload/load file1.ini if you want only you can do it

change this

if ($nick isop $chan) {

to this

if ($wildsite == YOURWILDSITE) {
 Respond  
Sebastianb   -  Aug 14, 2009

i wanna change it alot but i dont know what to look wht i have i want to only unload my one scpript how would i do that itsfile1.ini

on :text:!bot on:#:{
if ($nick isop $chan) {
load -rs $2- $+ .ini
/msg $chan $2- $+ .ini Loaded!
}
}
on
:text:!bot off:#:{
if ($nick isop $chan) {
unload -rs $2- $+ .ini
/msg $chan $2- $+ .ini Unloaded!
}
}

 Respond  
CakerX   -  Jan 02, 2007

using .load -rs $2- instead of .load -rs $2- ini would be good enough.

anyway I don\'t think that remote loading is a great idea. Nicknames can be taken over, so I\'d have more security than just if ( $nick == %owner ).

I\'d also do something like on trusted:text:!load*:#:

and have the owner\'s IP address with the \"trusted\" level in the level section.

Being its a non-numeric level, no default level can trigger it, making it uber-exclusive, which is neccary because someone having access to load -rs on your machine is fairly comprimising.

 Respond  
ZabuzaMomochi   -  Jan 01, 2007

lol, sorry it was like, 4am i guess i didnt read yours slowly enough lol

 Respond  
[M]ike   -  Jan 01, 2007

Zabuza, I didn\'t say ALL scripts are .mrc I said \'most\' and also, I said address, because the server I\'m on has too many users to give vhosts to them all. Yes, is $file could be used, and once I\'ve finsihed my massive bot control script I\'ll upload it and you\'ll see how I did it ;)

 Respond  
ZabuzaMomochi   -  Jan 01, 2007

on the 6th line, 11th word, where i said \'load\' i meant \'unload\'

 Respond  
ZabuzaMomochi   -  Jan 01, 2007

well, scripts can be in .mrc AND .ini files, i think your first file in your remotes(the default one when you first download mIRC) is in .ini format, but when you usually download mirc addons, it will be in .mrc format. So really, you should change load -rs $2- $+ .ini and change it to load -rs $2-
Just because the bot owner should know if what they\'re trying to upload is in .ini or .mrc format. Also change unload -rs $2- $+ .ini to load -rs $2- And also, [M]ike, most people have vhosts on some registered nicks, but usually not on there bots, so you would want it to be the nick instead of it looking at the address. But there are many things to edit, im too tired to list them all though lol. (like checking if the file is real, and checking if what the person is trying to unload is the file with the above snippet in it) Sorry for this post being so long, lol.

 Respond  
[M]ike   -  Dec 31, 2006

why .ini? most scripts are .mrc? Also if they enterd !unload file.ini it would try to unload file.ini.ini so maybe try using if (.ini isin $2-) and also insted of if ($nick == blah blah blah) { why not use if ($address($nick,2) == $address($me,2) {
Jus some tips to help you

 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.