This will properly sort your list for you.
Also what are you doing with brand? you have put all of your passed arguments into $brand then did nothing with it. again with lrange you should use
Lastly are you sure you can privmsg -psybnc like that?
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
Good, now i want to transfer the password via eggdrop to $arg,
but don't know how i can extract the password 'nnendmpo' from a partyline chatwindow and send it to the added user.
The following text is published at the partyline:
[01:55:55] <botnick> [13:56] <<tessa1>> !tessa1! !adduser testnick
[01:55:56] <botnick> [13:56] [-psyBNC!psyBNC@lam3rz.de] Sun Jun 12 13:56:15 :New User:testnick (Bouncer.by.Some.net) added by botnick [01:55:56] <botnick> [13:56] [-psyBNC!psyBNC@lam3rz.de] Neuer Nutzer 'testnick' hinzugefuegt. Password auf 'nnendmpo' eingestellt
make a msg or msgm bind for psy and extract the value via scan or regex. also possible is to split the line into a list and trim the ' around the list element.
if I am talking about ::lastnick, you shouldn't try to save as lastnick, should you?
the diffrenze between these are that ::lastnick is a global var while lastnick is procedure specific (unless its made global an other way).
so just add after
putquick "PRIVMSG -psyBNC :adduser $arg :Bouncer.by.Some.net"
some line like:
set ::lastnick $nick