I think OOP would be a great feature for mIRC scripting.
It would allow people to code faster, make snippets that can be used more easily, etc, etc.
I think it could be implimented without breaking old scripts by:
Having a command that states that OOP will be used in the script, I.E:
alias somealias {
OOP on
var ^oopvar = new object(Hello World!)
^oopvar->hello
}
class object {
private %msg = $1-
public alias hello {
echo $iif(%msg,$v1,Hi World!)
}
}
^oopvar would be unset when the script finished.
alias somealias {
OOP on
set ^oopvar new object(Hello World!)
^oopvar->hello
}
class object {
private %msg = $1-
public alias hello {
echo $iif(%msg,$v1,Hi World!)
}
}
The object would remain, and would retain all variables set inside the object, then you could unset it by typing: