The following forum message was posted by psychon at http://sourceforge.net/projects/znc/forums/forum/396039/topic/3751381:
No idea what you are doing, but works fine here. Also, you want us to do the work for which you are getting paid? Sounds like we\'ll need to receive a donation here... ;)
Also, if you really are losing your cookie, how could we help with that?
Anyway, this took me like 10 minutes:
CURL=\"curl --cookie-jar cookies --cookie cookies\"
# Log us in
$CURL --data \"submitted=1&user=$USER&pass=$PASS\" \"$SITE/login\" -o /dev/null
# Get the CSRF token
CSRF=$($CURL \"$SITE/mods/webadmin/adduser\" | grep CSRF | cut -f 6 -d \\\")
# Add user
$CURL --data \"_CSRF_Check=$CSRF&submitted=1&newuser=$NEWUSER&password=$NEWPASS&password2=$NEWPASS\" \"$SITE/mods/webadmin/adduser\"
The following forum message was posted by dabbers at http://sourceforge.net/projects/znc/forums/forum/396039/topic/3751381:
Well turns out it WAS the cookie. My client was having permission issues for the cookie file so it wasn\'t storing the previous token. All is good now. Thank you for your help! :)
Also, when I asked for another way I was thinking if maybe a module was needed so I was sort of looking for that suggestion. :x I would never want someone to do something from me :x