Sorasyn commented on a Page, Santas Bag   -  Mar 17, 2012

@thegingon: Use PHPBB code tags ;) [ and ] instead of < and >

I shudder at the sight of global variables so,

Set %SB $rand(1,18)

At the very least practice using /var -- much cleaner and the value doesn't stick in your variables until the end of time.


on *:TEXT:*:#: {
  set %trigger !
  if ($+(%trigger,SantasBag) == $strip($1)) { 

This not only includes the variable which, for some reason, you decided to store "!" and use it to compare the line to the trigger.


it would be one thousand times easier to simply write


That being said, that was a re-write of your current code. Like TheGingOn has stated. You could eliminate 2 out of those 3 lines with an expanded TEXT event statement.

On *:TEXT:!SantasBag:#:{

In summary, using goto statements as compared to your method would prove to be a cleaner alternative. However, yours works as it should, which is more than some people can say. Looks good though don't get me wrong.

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.