Throttle on joining/leaving channels?

I'm trying to circumvent the bugged out channels on login with an addon I started last night, but when it executes, it only leaves the channel but doesn't re-join. It will work when I run the commands individually, but they won't work in succession.
cInfo is the argument where the specific channel name is being passed.
Anyone have any advice or experience with this?
- Code: Select all
function CL_Actions(cInfo)
LeaveChannelByName(cInfo)
JoinChannelByName(cInfo)
CL_print("Reset channel [" .. cInfo .. "]")
end
cInfo is the argument where the specific channel name is being passed.
Anyone have any advice or experience with this?