Module Writer

By TMFKSOFT on Jan 30, 2011

This is a simple script I created when I was bored.
Even during testing people have taken to it so i've posted it.

Commands:
!write module - start writing a module
!write new - Overwrite or write a clean module
!write name [NAME] - Set module name after !write module
!write stop - Stop writing the module

Everything said between " !write name [NAME] " and " !write stop "
is written to the module.

I will hope to expand it!
Just load the new scripts as if a its a normal script.

UPDATES:
31st Jan 2011 - Added auto load so the module is loaded.
31st Jan 2011 - The script stays confined to one channel.

;Module Writer, Write modules in your own channel
;Set %owner as your nick!
; Created By TMFKSOFT!
on 1:TEXT:!write module:#:{
  if ( $nick == %owner ) {
    msg # Commencing Module Writer,
    msg # Use " !write name [NAME] " to set the module name
    set %write 1
    set %chan $chan
  }
}
on 1:TEXT:!write new:#:{
  if ( $nick == %owner ) {
    msg # Commencing Module Writer,
    msg # Use " !write name [NAME] " to set the module name
    set %write 4
    set %chan $chan    
  }
}

on 1:TEXT:!write name *:#:{
  if ( $nick == %owner ) {
    if ( %write == 1 ) { msg %chan Writing to $3 | set %module $3 | set %write 2 | write $3 ; $+ $3 module written using AmyBot Module Writer }
    if ( %write == 4 ) { write -c $3 ; $+ $3 module written using AmyBot Module Writer | msg %chan Writing to $3 | set %module $3 | set %write 2 }

  }
}
on 1:TEXT:!write stop:#:{
  if ( $nick == %owner ) {
    if ( %write == 2 ) {
      msg %chan Module %module written and loaded.
      write %module ;Module by $nick
      load %module
      unset %write %module %chan
    }
  }
}
on 1:TEXT:*:#:{
  if ( $nick == %owner ) {
    if ( %write == 2 ) {
      write %module $1-
    }
  }
}

Comments

Sign in to comment.
TMFKSOFT   -  Apr 08, 2011

Provding the network is secure,
It should take more than 60 - 20 seconds to write a module and load it,
Services normally changes your nick if you dont identify so the script would stop responding.

 Respond  
Known   -  Apr 03, 2011

He is saying it's a risk as say if you put this on a bot, then go to work and make a module, once you leave work your nickname is offline and someone could grab it since your

  if ( $nick == %owner ) {

isn't very safe to start with, and they could just kill your computer pretty much.

 Respond  
TMFKSOFT   -  Apr 02, 2011

sean, most likley not as only the bots owner can create and load the modules.
Very useful if you are away from home or just simply cannot access the bot.

 Respond  
MoshMage   -  Feb 21, 2011

there'd be no way of knowing who has it loaded, tho. but yesh, i guess we could all !write on start format c:/ and hope for the better :x

 Respond  
sean   -  Feb 21, 2011

this looks like a serious security risk.

 Respond  
MoshMage   -  Feb 21, 2011

once i thought about doing something like this, but then it just hit me: FTP :x
althought you CAN improve this, it's not that bad

 Respond  
TMFKSOFT   -  Jan 30, 2011

hm btw BattleMonkey i have added that so the user knows that that text has been written, Else the wouldnt know if its still writing.

 Respond  
Jethro   -  Jan 30, 2011

Nice going, Battlemonkey. Perhaps you could try to do it with one text event with if and elseif conditions next time.

 Respond  
Battlemonkey   -  Jan 30, 2011
      msg # Data written.

That's not really important, if you're writing a particularly big module or whatever, it would start spamming that.

 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.