in texter 4.5 how do i get the nick to be shown on the user that writes the CMD
example
CMD +wc
shows
----------------->[user] Siger
\\\II///
/ 0 0 \
\c --_)
) (
/ \
_o _ / \ \ _
I I / / \ _O__
I I_((_______ I
\ / / /_
\______ / (___)Jeg er lige p? potten ;o)
Replace this code
function showtext(user, file, where)
local handle = openfile(FDFolder.."/"..file..".txt", "r")
local contents = gsub(read(handle, "*a"),strchar(10), "\r\n")
closefile (handle)
if where == "main" then
user:SendData(Bot, "\r\n"..contents.."\r\n|")
elseif where == "allmain" then
SendToAll(Bot, "\r\n"..contents.."\r\n|")
elseif where == "allpm" then
SendPmToAll(Bot, "\r\n"..contents.."\r\n|")
else
user:SendPM(Bot, "\r\n"..contents.."\r\n|")
end
end
for this
function showtext(user, file, where)
local handle = openfile(FDFolder.."/"..file..".txt", "r")
local content = gsub(read(handle, "*a"),strchar(10), "\r\n")
closefile (handle)
contents = gsub(content, "%b[USER]",user.sName)
if where == "main" then
user:SendData(Bot, "\r\n"..contents.."\r\n|")
elseif where == "allmain" then
SendToAll(Bot, "\r\n"..contents.."\r\n|")
elseif where == "allpm" then
SendPmToAll(Bot, "\r\n"..contents.."\r\n|")
else
user:SendPM(Bot, "\r\n"..contents.."\r\n|")
end
end
and put in every txt file [USER]
dosen?t work
try this 1.
function showtext(user, file, where)
local handle = openfile(FDFolder.."/"..file..".txt", "r")
local content = gsub(read(handle, "*a"),strchar(10), "\r\n")
closefile (handle)
contents = gsub(content, "%[USER]",user.sName)
if where == "main" then
user:SendData(Bot, "\r\n"..contents.."\r\n|")
elseif where == "allmain" then
SendToAll(Bot, "\r\n"..contents.."\r\n|")
elseif where == "allpm" then
SendPmToAll(Bot, "\r\n"..contents.."\r\n|")
else
user:SendPM(Bot, "\r\n"..contents.."\r\n|")
end
end
@ _XStaTiC_: %b captures strings between the 1st 2 chars which are after the b.
in your case it would be something between the [ and the U followed by SER.
all needed is 2 excape the [ from being magic, %[.
plop
don?t get it dosen?t work