on *:text:*:*: {

the brace isn't the first on the line, the first on the line there is "on" :tongue:

Opening braces never go alone on a line as the first char...ever.


Opening chars are only used when:
  • The start of an alias, right after the alias name (although its not necessary, if the commands or constructs are either all piped on one full line, or if there's simply only one command)

    alias myalias {
    do things
    }
  • For opening an event, whether that is a regular event, raw event, ctcp event etc.

    on *:TEXT:*:*: {
    do things
    }

    Same comments as with the alias, they are only needed to group multiple commands or if then else constructs
  • For creating popup menu's for nicklist, channel, etc;

    menu channel {
    popups
    }
  • For ordering if then else constructs:

    if (condition) {
    stuff
    }
    elseif (other condition) {
    do other stuff
    }
    else {
    do default stuff
    }

    A while condition is actually an if condition (or multiple ones) in a while loop, so they go with this category.

    while (condition) {
    do things
    }
  • Opening a dialog (thanks tidy smile):

    dialog mydialog {
    dialog code
    }


    There could be more, but to be honest, I have been up for 24 hours and 42 minutes now, a person tends to forget things at that time :tongue:

Greets

Last edited by FiberOPtics; 17/01/05 01:56 AM.

Gone.