PtokaX forum

Development Section => HOW-TO's => HOW-TO requests => Topic started by: sourabhiitm on 23 September, 2007, 11:10:44

Title: $UserCommands Help
Post by: sourabhiitm on 23 September, 2007, 11:10:44
I want to know the formating of usercommands. I know about these two.Is there any other type

1)
 curUser:SendData("$UserCommand 1 3 Chat History\\by No of Days$<%[mynick]> !dayhistory %[line:Enter No of days]&#124;")
2)
  curUser:SendData("$UserCommand 1 3 Chat History\\Last 200 chats$<%[mynick]> !history&#124;")
If some 1 can provide me reference for usercommands . It will e great..

Thanks in advance
Title: Re: $UserCommands Help
Post by: Rincewind on 23 September, 2007, 12:48:25
The structure is this;

$UserCommand <type> <context> <details>|

<type> What is the command?
0 = separator
1 = raw - Most Commands
2 = mainchat - File Related Commands - to prevent sending command more than once in search results
255 = erase all previous commands


<context> What is the command for?
1 = Hub Command - Hub Settings etc...
2 = User Command - User List - commands with %[nick]
4 = File Command - Search Window
3 = 1 + 2 = Hub and User
5 = 1 + 4 = Hub and File
6 = 2 + 4 = User and File
7 = 1 + 2 + 4 = Hub, User and File

<details> Differs per <type>
<type> 0 = leave blank
<type> 1 = <title>$<command> or <menu>\<title>$<command>
<type> 2 = see type 1
<type> 255 = leave blank


--

Also, you can also use %[nick] to pull the nick of the user clicked on. e.g. $UserCommand 1 2 Grimoire\\Security\\Kick$<%[mynick]> +kick %[nick] %[line:Reason]&#124;|

Hope the above helps
Title: Re: $UserCommands Help
Post by: sourabhiitm on 23 September, 2007, 14:12:07
YA.. IT did .. Thanx a lot..   ;)