Page 1 of 1

Scripting

Posted: March 28th, 2008, 11:29 pm
by {Andrew}
Hey,

I would like to starting learning more on how to script and how to like secure my scripts and make it so people can not have any way to abuse them, like flooding them etc... If there is someone with some time on there hands that would be willing to teach me somethings about scripting c++ that would be awesome!! thanks

~Andrew~

Re: Scripting

Posted: March 29th, 2008, 12:27 am
by Drkpwn3r
2 things before you can get a good response:
1: C++ isn't scripting, it's programming (difference is readable source code vs obfuscated/packed source code).
2: Which kind of scripting are we speaking of, if at all? (I'm assuming IRC based on your post) :?

Re: Scripting

Posted: March 29th, 2008, 2:57 am
by cnb6
if its about mIRC scripting, I could teach you some ;)
just join the IRC server (IRC.tsugaming.com) and talk to me in #hangout

Cya,
Thomas

Re: Scripting

Posted: March 29th, 2008, 7:40 pm
by {Andrew}
Yea Mirc scripting, and cnb im banned remember so I really can't.

Re: Scripting

Posted: March 30th, 2008, 8:24 am
by mmmcrak
cool i didnt no that u are from MI go wolverines UM all the way (football that is)

Re: Scripting

Posted: March 30th, 2008, 9:24 am
by cnb6
Well, then we should have contact by another IRC server, Your suggest one?
Or Ill need to make a tutorial here.. but that takes alot of time :P
well Cya,
Thomas

Re: Scripting

Posted: March 30th, 2008, 3:57 pm
by {Andrew}
Yea Michigan Woo hooooooo lol, Well cnb im on swiftirc all the time too. =)

Re: Scripting

Posted: March 31st, 2008, 5:23 am
by cnb6
oke, pm me a channel where you are ;)

Re: Scripting

Posted: March 31st, 2008, 4:05 pm
by Drkpanoz
Ok, here goes.

Say your script is:

Code: Select all

on *:TEXT:*:#: {
  if ($chan == #mychan) {
    tokenize $strip($1-) 32
    var %cmdchar = $left($1,1)
    if (%cmdchar == $chr(33)) {
      var %cmd = $right($1,-1)
      if (%cmd == floodme) {
        msg $chan Someone triggered my message!
      }
    }
  }
}
And you want to protect it, so add a temp var to the floodme command. Like so:

Code: Select all

on *:TEXT:*:#: {
  if ($chan == #mychan) {
    tokenize $strip($1-) 32
    var %cmdchar = $left($1,1)
    if (%cmdchar == $chr(33)) {
      var %cmd = $right($1,-1)
      if (%cmd == floodme) {
        if (!%tmp) {
          .set -u10 %tmp 1
          msg $chan Someone triggered my message!
        }
        else { msg $chan Can't trigger it yet! }
      }
    }
  }
}

Re: Scripting

Posted: April 1st, 2008, 1:44 am
by {Andrew}
I don't even understand what that does, I'm not that advanced even though im sure that is pretty easy stuff. Cnb6 I sent you memo on Swiftirc. Thanks btw Drkpanoz