Skip to forum content

You are not logged in. Please login or register.


forums.pvpgn.pro → [EN] Diablo → auto join chat channel

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 2

1

Topic: auto join chat channel

hello friends
im running diabloi 2 server and i would like to know how to do auto join channel when player exit game or enter the realm
so instead on pusing the "enter chat" botton he will automatically enter chat without doing anything..

and also one more question how to i add auto function when anyone enter to the chat by default so it will activate /flag...  X...
or anyother pre command ..


thanks alot..

2

Re: auto join chat channel

No way to autojoin channel. This is a client side feature, but not server side.

You can handle user join event in Lua https://github.com/pvpgn/pvpgn-server/b … el.lua#L18
Unfortunately API method to change user flag is still not exposed to Lua scripts. It's conn_set_flags() function in C++ code.

But you can change "user icon" in https://github.com/pvpgn/pvpgn-server/b … er.lua#L33, it handles when a user join channel too.
For example this way

function handle_user_icon(account, iconinfo)
    INFO(iconinfo) -- display current icon
    if (account.name == "HarpyWar") then
        return "PX3W" -- set warcraft 3 icon
    end
end

You can "/rehash lua" each time after script is modified. No need to restart the whole server.

Do not ask for support in PM.

Posts: 2

Pages 1

You must login or register to post a reply

Who now at forum

Currently view post: 0 guests, 0 registered users

forums.pvpgn.pro → [EN] Diablo → auto join chat channel