Author Topic: Please Help Me settings nick ptokax  (Read 2091 times)

0 Members and 1 Guest are viewing this topic.

Offline Alinus

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Please Help Me settings nick ptokax
« on: 02 April, 2005, 22:42:28 »
YES.Some nicks contain this: [EU][RO][ISP].all kinds of this.The point is NOT TO LET the users with those nicks in.Just simple nicks
« Last Edit: 02 April, 2005, 22:58:51 by Alinus »

PtokaX forum

Please Help Me settings nick ptokax
« on: 02 April, 2005, 22:42:28 »

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 744
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
(No subject)
« Reply #1 on: 02 April, 2005, 22:48:16 »
So you want a script that checks whether nicks contain letters and numbers (and underscores) only?
Everything could have been anything else and it would have just as much meaning.

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 744
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
(No subject)
« Reply #2 on: 02 April, 2005, 23:07:22 »
Try this... not tested.

Code: [Select]
function MyINFOArrival(user,data)
local _,_,nick=string.find(data,"%$MyINFO %$ALL (%S+)")
if nick then
if string.find(nick,"[%W^%_]") then
user:SendData("NickCheck","Only letters, numbers and underscores are allowed in nick!")
end
end
end
Everything could have been anything else and it would have just as much meaning.

PtokaX forum

(No subject)
« Reply #2 on: 02 April, 2005, 23:07:22 »