I don't think that will work. the ischan will fail. "ischan if v1 is a channel which you are on." Since it is a socket bot, that means /join #channel was never done, instead he had to /sockwrite JOIN #channel which would not be recognized by ischan.