Author Topic: Disable scripts?  (Read 2725 times)


  • Guest
Disable scripts?
« on: January 24, 2010, 10:19:01 PM »
I have just started to get the hang of Icechat. I do however, have a problem. I sign in with two users, one that I use to chat, and the other that I to run my scripts. Whenever someone trys to run a script, it runs it through both of my users. Is there anyway to disable scripts on my main user, but keep them running on my second user?

Thanks a million,



  • Full Member
  • ***
  • Posts: 135
  • Scripts for Praise
    • CorpseCorp
Re: Disable scripts?
« Reply #1 on: January 24, 2010, 10:28:08 PM »
There are two ways to accomplish this.

The most practical is to run icechat under profiles, and run it twice. once for you to chat with, with your settings, and once for your bot, with its own settings and scripts loaded. you'll have icechat running twice but you can set the bot to hide in the system tray if you want. that is the method I chose for a while.

The second method is to add checks in all your scripts for the nickname. using the vbs engine you can accomplish this by doing

Code: [Select]
if MyNickName(ServerNumber)="Chat_bot_name" then
    'my other code goes here
End IF

Hope that helps.
This message brought to you by the Wonderful Wizard of Oz.


  • Guest
Re: Disable scripts?
« Reply #2 on: January 25, 2010, 03:25:02 AM »
I'm not exactly sure how to do your first method. The second I need a little help with it. I understand it. Can't get it to work.

Code: [Select]
if MyNickName(ServerNumber)="KayBot" then
    'my other code goes here
End IF

Function RandNick(Channel,ServerNumber)
  Total = GetIdentifier("$nick(" & channel & ",0)",ServerNumber)
  num = Int(RND * Total)+1
  RandNick = GetIdentifier("$nick(" & channel & "," & num & ").nick",ServerNumber)
End Function

Sub ONTEXT(Message,Channel,Nickname,Host,ServerNumber)
 if lcase(Message) = ".commands" then
SendCommand "/msg " & channel & " .help - Load the help list!",ServerNumber
SendCommand "/msg " & channel & " .spin - Spin the bottle!",ServerNumber
SendCommand "/msg " & channel & " .hangman - Play Hangman!",ServerNumber
SendCommand "/msg " & channel & " .chuck - Load a random Chuck joke!",ServerNumber
SendCommand "/msg " & channel & " .chuckinfo - Add a Chuck joke!",ServerNumber
SendCommand "/msg " & channel & " .quote - Load a random Gekin quote!",ServerNumber
SendCommand "/msg " & channel & " Try to find all of the hidden commands!",ServerNumber
end if
End Sub

Should the code look like this?




  • Guest
Re: Disable scripts?
« Reply #3 on: January 25, 2010, 03:32:40 AM »
Sorry fo the doublepost. I do understand the first method, though how do I run IceChat under two profiles?


  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 256
Re: Disable scripts?
« Reply #4 on: January 25, 2010, 05:59:32 AM »
In the icechat settings there's a setting 'User profiles (multiple Icechat users)', enable that and restart. From that point it's pretty straightforward.

As for enabling the scripts for only one user. You need to have the code DarkStar pasted, inside every sub that can be triggered by other users
"I don't know what World War 3 will be fought with, but I know World War 4 with be fought with sticks and stones." - Albert Einstein