oh i think its problem with the nick length, if nick length more than 9 then it doesn't work and if nick is less than 9 then it works, so it means adduser fails due to nicklength. Do i need to change the nick length in the source?
oh log says XXX 0 in both cases even if it worked or not. i've added that log after
adduser $nick [maskhost [getchanhost $nick $chan]]
oh also if nick length is 12 then adduser was taking just 9.