From http://en.znc.in/wiki/User:Psychon/ToDo, implement #10 -- "WritePidFile and DeletePidFile should use some common code to get the path for the pid file (copy & paste is evil :P) ".
Oh, also it could make sense to make InitPidFile() protected/private since it's not really meant to be used by others. But that's pretty much a matter of taste...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
v1 patch
Uhm, not going to commit this.
Here's a hint: When you call new, it usually makes sense to call delete later on.
And another hint: Don't code when tired, I usually write stupid bugs when I do that. ;)
Oh, also it could make sense to make InitPidFile() protected/private since it's not really meant to be used by others. But that's pretty much a matter of taste...
v2 patch
r1929, thanks.