File: connect.py

package info (click to toggle)
crossfire-maps 1.75.0%2Bdfsg1-1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 275,656 kB
  • sloc: python: 7,711; sql: 92; sh: 73; makefile: 7
file content (8 lines) | stat: -rw-r--r-- 328 bytes parent folder | download
1
2
3
4
5
6
7
8
# -*- coding: utf-8 -*-
# Simple script to trigger the connection given as a parameter.
# Setting the script option to "3" will turn the connection 3 on in the map it was called from.

import Crossfire

if Crossfire.ScriptParameters().isdigit():
    Crossfire.WhoAmI().Map.TriggerConnected(int(Crossfire.ScriptParameters()), 1)