diff options
Diffstat (limited to 'plugins/Watrack/docs/wat.php')
-rw-r--r-- | plugins/Watrack/docs/wat.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/plugins/Watrack/docs/wat.php b/plugins/Watrack/docs/wat.php new file mode 100644 index 0000000000..d15049dd72 --- /dev/null +++ b/plugins/Watrack/docs/wat.php @@ -0,0 +1,28 @@ +<?php
+
+include_once 'const.php';
+
+function mbot_load()
+{
+ mb_SchReg("ex/1min","* * *",'every_1min',1,1);
+}
+
+function every_1min()
+{
+ $songinfo = 0;
+ if(mb_SysCallService(MS_WAT_GETMUSICINFO, WAT_INF_ANSI,
+ mb_SysGetPointer($songinfo))!=WAT_PLS_NORMAL)
+ return 0;
+
+ $artist_pos = mb_SysGetNumber($songinfo+wato_artist, 4);
+ $artist = mb_SysGetString($artist_pos);
+
+ $title_pos = mb_SysGetNumber($songinfo+wato_title, 4);
+ $title = mb_SysGetString($title_pos);
+
+ $newtext = "mp3: $artist - $title";
+
+ mb_MsgBox($newtext, "MBot", 4);
+ return 0;
+}
+?>
\ No newline at end of file |