if you using libcod:
PHP Code:
/* your callback script (callbacksetup) */
CodeCallback_UserInfoChanged(num)
{
name = self get_userinfo("name");
if (self.name != name && !self isBot())
{
self.name = name;
return self thread scripts\_names::checkme();
}
self clientuserinfochanged();
}
This is not very good code, it is best to rework the renaming functions with the return of the result (yes / no) in case of success (good nickname) / failure (nickname is not allowed) -> then update / do not update userinfo
if you not using libcod, create loop for checking name != oldname with delay: 0.5 - 1 sec.
Or insert checking-code into exist loop.